Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: graphql/graphql-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.1.1
Choose a base ref
...
head repository: graphql/graphql-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.2.0
Choose a head ref

Commits on Jan 17, 2019

  1. Copy the full SHA
    b3d1f7b View commit details
  2. Copy the full SHA
    301e5aa View commit details

Commits on Jan 18, 2019

  1. Copy the full SHA
    4abedd3 View commit details
  2. Inspect non-error types to produce helpful error messages for failing…

    … resolvers (#1600)
    
    Inspect non-error types to produce helpful error messages for failing resolvers (even though you should not throw literals, ever)
    kommander authored and IvanGoncharov committed Jan 18, 2019
    Copy the full SHA
    5b17d41 View commit details
  3. [RFC]Add 'toConfig' method (#1331)

    `toConfig` is intended to help with schema transformation by minimizing the amount of code you need to write and maintain, e.g. [recreateType](https://github.com/apollographql/graphql-tools/blob/4e68230c10a9fd1c6cb601869aa3a1ff8f9f0b90/src/stitching/schemaRecreation.ts#L33) from `graphql-tools`.
    IvanGoncharov authored Jan 18, 2019
    Copy the full SHA
    92e647c View commit details

Commits on Jan 20, 2019

  1. Copy the full SHA
    898cf20 View commit details
  2. Copy the full SHA
    fd308ce View commit details
  3. Update deps (#1676)

    IvanGoncharov authored Jan 20, 2019
    Copy the full SHA
    f1f1730 View commit details

Commits on Jan 21, 2019

  1. 16
    Copy the full SHA
    183ff32 View commit details
  2. Copy the full SHA
    bdfd1c6 View commit details

Commits on Jan 22, 2019

  1. Copy the full SHA
    c2bc19b View commit details
  2. Copy the full SHA
    ba7b8c1 View commit details

Commits on Jan 23, 2019

  1. Update deps (#1685)

    IvanGoncharov authored Jan 23, 2019
    Copy the full SHA
    6af5a0c View commit details
  2. Switch from coveralls to codecov for Travis CI (#1687)

    * Switch from coveralls to codecov for Travis CI
    
    * move to devDepencies
    mjmahone authored Jan 23, 2019
    Copy the full SHA
    4ed25af View commit details
  3. Copy the full SHA
    27691d8 View commit details

Commits on Jan 24, 2019

  1. Copy the full SHA
    ff041ce View commit details
  2. Copy the full SHA
    005e96c View commit details

Commits on Jan 25, 2019

  1. Copy the full SHA
    5fc3faf View commit details
  2. Copy the full SHA
    d49460f View commit details
  3. Copy the full SHA
    2cf7cdd View commit details
  4. Copy the full SHA
    8cd3150 View commit details

Commits on Jan 27, 2019

  1. Make codecov less spammy (#1694)

    Make codecov less spammy
    IvanGoncharov authored Jan 27, 2019
    Copy the full SHA
    0324ba9 View commit details

Commits on Jan 28, 2019

  1. Copy the full SHA
    f57a01e View commit details
  2. Copy the full SHA
    afc6b7c View commit details
  3. Copy the full SHA
    784e71b View commit details
  4. Copy the full SHA
    c680b6c View commit details

Commits on Jan 29, 2019

  1. Copy the full SHA
    e2dec84 View commit details
  2. Documentation for explicitly mentioning ObjectTypes (#1679)

    * Documentation for explicitly mentioning ObjectTypes
    
    Based on the discussion at #1413
    
    * Minor typo/fix
    
    * Edit example doc for schema definition
    
    - provide more clear example /w interfaces & types
    - rewrite to note with more clarity
    - move the note above the note on directives
    
    * clarify documentation
    
    * Remove unwanted star
    elevenpassin authored and IvanGoncharov committed Jan 29, 2019
    Copy the full SHA
    f1c9b82 View commit details

Commits on Jan 30, 2019

  1. Update deps (#1699)

    IvanGoncharov authored Jan 30, 2019
    Copy the full SHA
    6bf2b44 View commit details

Commits on Jan 31, 2019

  1. Copy the full SHA
    7947145 View commit details

Commits on Feb 1, 2019

  1. Copy the full SHA
    213c8a7 View commit details
  2. Copy the full SHA
    96c826d View commit details

Commits on Feb 3, 2019

  1. Copy the full SHA
    56ad8a1 View commit details
  2. Copy the full SHA
    34b7ced View commit details
  3. Copy the full SHA
    ebec940 View commit details
  4. Copy the full SHA
    9cf372f View commit details
  5. Copy the full SHA
    d98f40c View commit details
  6. Copy the full SHA
    f21acae View commit details
  7. Copy the full SHA
    f2a0c64 View commit details

Commits on Feb 4, 2019

  1. Update deps (#1712)

    IvanGoncharov authored Feb 4, 2019
    Copy the full SHA
    be2408e View commit details

Commits on Feb 5, 2019

  1. Update deps (#1714)

    IvanGoncharov authored Feb 5, 2019
    Copy the full SHA
    7fa94cd View commit details
  2. Copy the full SHA
    82851fc View commit details

Commits on Feb 6, 2019

  1. Copy the full SHA
    c32d2d8 View commit details
  2. Copy the full SHA
    d55f6d3 View commit details

Commits on Feb 7, 2019

  1. Copy the full SHA
    0f3c177 View commit details

Commits on Feb 8, 2019

  1. Copy the full SHA
    65a499a View commit details
  2. Copy the full SHA
    271e23e View commit details

Commits on Feb 10, 2019

  1. Copy the full SHA
    948c9cf View commit details
  2. Move 'Object.toString' test to the appropriate files (#1723)

    Move 'Object.toString' tests to the appropriate files
    IvanGoncharov authored Feb 10, 2019
    Copy the full SHA
    2fcd55e View commit details
  3. Copy the full SHA
    55c03fb View commit details
Showing with 3,857 additions and 4,013 deletions.
  1. +1 −12 .babelrc.js
  2. +6 −0 .browserslistrc
  3. +4 −2 .eslintrc.yml
  4. +1 −1 .flowconfig
  5. +1 −0 .gitignore
  6. +5 −0 .mocharc.yml
  7. +2 −1 .prettierrc
  8. +17 −18 .travis.yml
  9. +1 −1 LICENSE
  10. +1 −1 README.md
  11. +14 −0 codecov.yml
  12. +18 −22 package.json
  13. +74 −23 resources/benchmark.js
  14. +1 −1 resources/copy-package-json.js
  15. +1 −1 resources/inline-invariant.js
  16. +6 −55 resources/watch.js
  17. +1 −1 src/__fixtures__/index.js
  18. +1 −1 src/__fixtures__/kitchen-sink.graphql
  19. +1 −1 src/__fixtures__/schema-kitchen-sink.graphql
  20. +1 −1 src/__tests__/starWarsData.js
  21. +2 −3 src/__tests__/starWarsIntrospection-test.js
  22. +1 −1 src/__tests__/starWarsQuery-test.js
  23. +2 −3 src/__tests__/starWarsSchema.js
  24. +1 −1 src/__tests__/starWarsValidation-test.js
  25. +1 −1 src/error/GraphQLError.js
  26. +3 −3 src/error/__tests__/GraphQLError-test.js
  27. +1 −1 src/error/__tests__/locatedError-test.js
  28. +1 −1 src/error/__tests__/printError-test.js
  29. +1 −1 src/error/formatError.js
  30. +1 −1 src/error/index.js
  31. +1 −1 src/error/locatedError.js
  32. +1 −1 src/error/printError.js
  33. +1 −1 src/error/syntaxError.js
  34. +2 −2 src/execution/__tests__/abstract-promise-test.js
  35. +1 −1 src/execution/__tests__/abstract-test.js
  36. +1 −1 src/execution/__tests__/directives-test.js
  37. +49 −5 src/execution/__tests__/executor-test.js
  38. +1 −1 src/execution/__tests__/lists-test.js
  39. +1 −1 src/execution/__tests__/mutations-test.js
  40. +20 −22 src/execution/__tests__/nonnull-test.js
  41. +1 −1 src/execution/__tests__/resolve-test.js
  42. +1 −1 src/execution/__tests__/schema-test.js
  43. +1 −1 src/execution/__tests__/sync-test.js
  44. +2 −2 src/execution/__tests__/union-interface-test.js
  45. +13 −27 src/execution/__tests__/variables-test.js
  46. +41 −27 src/execution/execute.js
  47. +7 −2 src/execution/index.js
  48. +7 −7 src/execution/values.js
  49. +18 −4 src/graphql.js
  50. +2 −1 src/index.js
  51. +1 −1 src/jsutils/ObjMap.js
  52. +2 −2 src/jsutils/{MaybePromise.js → PromiseOrValue.js}
  53. +2 −2 src/jsutils/__tests__/dedent-test.js
  54. +75 −1 src/jsutils/__tests__/inspect-test.js
  55. +1 −1 src/jsutils/__tests__/instanceOf-test.js
  56. +1 −1 src/jsutils/__tests__/quotedOrList-test.js
  57. +1 −1 src/jsutils/__tests__/suggestionList-test.js
  58. +1 −1 src/jsutils/dedent.js
  59. +1 −1 src/jsutils/defineToJSON.js
  60. +1 −1 src/jsutils/defineToStringTag.js
  61. +98 −20 src/jsutils/inspect.js
  62. +1 −1 src/jsutils/instanceOf.js
  63. +1 −1 src/jsutils/invariant.js
  64. +1 −1 src/jsutils/isInvalid.js
  65. +1 −1 src/jsutils/isNullish.js
  66. +1 −1 src/jsutils/isPromise.js
  67. +1 −1 src/jsutils/keyMap.js
  68. +1 −1 src/jsutils/keyValMap.js
  69. +1 −1 src/jsutils/mapValue.js
  70. +1 −1 src/jsutils/memoize3.js
  71. +1 −1 src/jsutils/nodejsCustomInspectSymbol.js
  72. +1 −1 src/jsutils/orList.js
  73. +1 −1 src/jsutils/promiseForObject.js
  74. +5 −5 src/jsutils/promiseReduce.js
  75. +1 −1 src/jsutils/quotedOrList.js
  76. +1 −1 src/jsutils/suggestionList.js
  77. +148 −0 src/language/__tests__/blockString-test.js
  78. +0 −96 src/language/__tests__/blockStringValue-test.js
  79. +1 −1 src/language/__tests__/lexer-test.js
  80. +1 −1 src/language/__tests__/parser-benchmark.js
  81. +1 −1 src/language/__tests__/parser-test.js
  82. +18 −65 src/language/__tests__/printer-test.js
  83. +1 −1 src/language/__tests__/schema-parser-test.js
  84. +10 −21 src/language/__tests__/schema-printer-test.js
  85. +20 −0 src/language/__tests__/source-test.js
  86. +1 −1 src/language/__tests__/toJSONDeep.js
  87. +30 −30 src/language/__tests__/visitor-test.js
  88. +1 −1 src/language/ast.js
  89. +31 −2 src/language/{blockStringValue.js → blockString.js}
  90. +1 −1 src/language/directiveLocation.js
  91. +1 −1 src/language/index.js
  92. +1 −1 src/language/kinds.js
  93. +39 −51 src/language/lexer.js
  94. +1 −1 src/language/location.js
  95. +80 −73 src/language/parser.js
  96. +1 −1 src/language/predicates.js
  97. +8 −17 src/language/printer.js
  98. +1 −1 src/language/source.js
  99. +1 −1 src/language/visitor.js
  100. +1 −1 src/polyfills/find.js
  101. +34 −0 src/polyfills/flatMap.js
  102. +1 −1 src/polyfills/isFinite.js
  103. +1 −1 src/polyfills/isInteger.js
  104. +1 −1 src/polyfills/objectEntries.js
  105. +1 −1 src/polyfills/objectValues.js
  106. +1 −1 src/subscription/__tests__/asyncIteratorReject-test.js
  107. +1 −1 src/subscription/__tests__/eventEmitterAsyncIterator-test.js
  108. +1 −1 src/subscription/__tests__/eventEmitterAsyncIterator.js
  109. +1 −1 src/subscription/__tests__/mapAsyncIterator-test.js
  110. +4 −5 src/subscription/__tests__/subscribe-test.js
  111. +1 −1 src/subscription/asyncIteratorReject.js
  112. +1 −1 src/subscription/index.js
  113. +5 −5 src/subscription/mapAsyncIterator.js
  114. +1 −1 src/subscription/subscribe.js
  115. +535 −896 src/type/__tests__/definition-test.js
  116. +9 −6 src/type/__tests__/directive-test.js
  117. +3 −5 src/type/__tests__/enumType-test.js
  118. +8 −15 src/type/__tests__/introspection-test.js
  119. +79 −1 src/type/__tests__/predicate-test.js
  120. +242 −51 src/type/__tests__/schema-test.js
  121. +1 −1 src/type/__tests__/serialization-test.js
  122. +0 −118 src/type/__tests__/toStringTag-test.js
  123. +14 −30 src/type/__tests__/validation-test.js
  124. +158 −10 src/type/definition.js
  125. +15 −1 src/type/directives.js
  126. +1 −1 src/type/index.js
  127. +10 −7 src/type/introspection.js
  128. +1 −1 src/type/scalars.js
  129. +60 −2 src/type/schema.js
  130. +4 −12 src/type/validate.js
  131. +1 −1 src/utilities/TypeInfo.js
  132. +1 −1 src/utilities/__tests__/assertValidName-test.js
  133. +1 −1 src/utilities/__tests__/astFromValue-test.js
  134. +1 −1 src/utilities/__tests__/buildASTSchema-benchmark.js
  135. +56 −12 src/utilities/__tests__/buildASTSchema-test.js
  136. +1 −1 src/utilities/__tests__/buildClientSchema-benchmark.js
  137. +3 −5 src/utilities/__tests__/buildClientSchema-test.js
  138. +1 −1 src/utilities/__tests__/coerceValue-test.js
  139. +1 −1 src/utilities/__tests__/concatAST-test.js
  140. +32 −28 src/utilities/__tests__/extendSchema-test.js
  141. +62 −58 src/utilities/__tests__/findBreakingChanges-test.js
  142. +1 −1 src/utilities/__tests__/findDeprecatedUsages-test.js
  143. +1 −1 src/utilities/__tests__/getOperationAST-test.js
  144. +1 −1 src/utilities/__tests__/getOperationRootType-test.js
  145. +1 −1 src/utilities/__tests__/introspectionFromSchema-benchmark.js
  146. +1 −1 src/utilities/__tests__/introspectionFromSchema-test.js
  147. +1 −1 src/utilities/__tests__/isValidLiteralValue-test.js
  148. +15 −15 src/utilities/__tests__/lexicographicSortSchema-test.js
  149. +39 −165 src/utilities/__tests__/schemaPrinter-test.js
  150. +1 −1 src/utilities/__tests__/separateOperations-test.js
  151. +1 −1 src/utilities/__tests__/typeComparators-test.js
  152. +1 −1 src/utilities/__tests__/valueFromAST-test.js
  153. +1 −1 src/utilities/__tests__/valueFromASTUntyped-test.js
  154. +1 −1 src/utilities/assertValidName.js
  155. +6 −5 src/utilities/astFromValue.js
  156. +59 −73 src/utilities/buildASTSchema.js
  157. +45 −56 src/utilities/buildClientSchema.js
  158. +3 −2 src/utilities/coerceValue.js
  159. +3 −9 src/utilities/concatAST.js
  160. +185 −296 src/utilities/extendSchema.js
  161. +1 −1 src/utilities/findBreakingChanges.js
  162. +3 −3 src/utilities/findDeprecatedUsages.js
  163. +1 −1 src/utilities/getOperationAST.js
  164. +9 −7 src/utilities/getOperationRootType.js
  165. +1 −1 src/utilities/index.js
  166. +1 −1 src/utilities/introspectionFromSchema.js
  167. +1 −1 src/utilities/introspectionQuery.js
  168. +2 −1 src/utilities/isValidJSValue.js
  169. +1 −1 src/utilities/isValidLiteralValue.js
  170. +67 −95 src/utilities/lexicographicSortSchema.js
  171. +61 −110 src/utilities/schemaPrinter.js
  172. +1 −1 src/utilities/separateOperations.js
  173. +1 −1 src/utilities/typeComparators.js
  174. +5 −2 src/utilities/typeFromAST.js
  175. +4 −2 src/utilities/valueFromAST.js
  176. +5 −2 src/utilities/valueFromASTUntyped.js
  177. +1 −1 src/validation/ValidationContext.js
  178. +1 −1 src/validation/__tests__/ExecutableDefinitions-test.js
  179. +5 −9 src/validation/__tests__/FieldsOnCorrectType-test.js
  180. +1 −1 src/validation/__tests__/FragmentsOnCompositeTypes-test.js
  181. +1 −1 src/validation/__tests__/KnownArgumentNames-test.js
  182. +1 −1 src/validation/__tests__/KnownDirectives-test.js
  183. +1 −1 src/validation/__tests__/KnownFragmentNames-test.js
  184. +1 −1 src/validation/__tests__/KnownTypeNames-test.js
  185. +1 −1 src/validation/__tests__/LoneAnonymousOperation-test.js
  186. +1 −1 src/validation/__tests__/LoneSchemaDefinition-test.js
  187. +1 −1 src/validation/__tests__/NoFragmentCycles-test.js
  188. +1 −1 src/validation/__tests__/NoUndefinedVariables-test.js
  189. +1 −1 src/validation/__tests__/NoUnusedFragments-test.js
  190. +1 −1 src/validation/__tests__/NoUnusedVariables-test.js
  191. +2 −3 src/validation/__tests__/OverlappingFieldsCanBeMerged-test.js
  192. +1 −1 src/validation/__tests__/PossibleFragmentSpreads-test.js
  193. +4 −4 src/validation/__tests__/PossibleTypeExtensions-test.js
  194. +1 −1 src/validation/__tests__/ProvidedRequiredArguments-test.js
  195. +1 −1 src/validation/__tests__/ScalarLeafs-test.js
  196. +1 −1 src/validation/__tests__/SingleFieldSubscriptions-test.js
  197. +1 −1 src/validation/__tests__/UniqueArgumentNames-test.js
  198. +1 −1 src/validation/__tests__/UniqueDirectiveNames-test.js
  199. +1 −1 src/validation/__tests__/UniqueDirectivesPerLocation-test.js
  200. +2 −2 src/validation/__tests__/UniqueEnumValueNames-test.js
  201. +2 −2 src/validation/__tests__/UniqueFieldDefinitionNames-test.js
  202. +1 −1 src/validation/__tests__/UniqueFragmentNames-test.js
  203. +9 −1 src/validation/__tests__/UniqueInputFieldNames-test.js
  204. +1 −1 src/validation/__tests__/UniqueOperationNames-test.js
  205. +11 −11 src/validation/__tests__/UniqueOperationTypes-test.js
  206. +1 −1 src/validation/__tests__/UniqueTypeNames-test.js
  207. +1 −1 src/validation/__tests__/UniqueVariableNames-test.js
  208. +1 −1 src/validation/__tests__/ValuesOfCorrectType-test.js
  209. +1 −1 src/validation/__tests__/VariablesAreInputTypes-test.js
  210. +1 −1 src/validation/__tests__/VariablesInAllowedPosition-test.js
  211. +1 −1 src/validation/__tests__/harness.js
  212. +1 −1 src/validation/__tests__/validateGQL-benchmark.js
  213. +1 −1 src/validation/__tests__/validateSDL-benchmark.js
  214. +5 −9 src/validation/__tests__/validation-test.js
  215. +1 −1 src/validation/index.js
  216. +2 −2 src/validation/rules/ExecutableDefinitions.js
  217. +2 −2 src/validation/rules/FieldsOnCorrectType.js
  218. +3 −3 src/validation/rules/FragmentsOnCompositeTypes.js
  219. +1 −1 src/validation/rules/KnownArgumentNames.js
  220. +5 −4 src/validation/rules/KnownDirectives.js
  221. +2 −2 src/validation/rules/KnownFragmentNames.js
  222. +1 −1 src/validation/rules/KnownTypeNames.js
  223. +2 −2 src/validation/rules/LoneAnonymousOperation.js
  224. +1 −1 src/validation/rules/LoneSchemaDefinition.js
  225. +1 −1 src/validation/rules/NoFragmentCycles.js
  226. +1 −1 src/validation/rules/NoUndefinedVariables.js
  227. +2 −2 src/validation/rules/NoUnusedFragments.js
  228. +4 −3 src/validation/rules/NoUnusedVariables.js
  229. +1 −1 src/validation/rules/OverlappingFieldsCanBeMerged.js
  230. +3 −3 src/validation/rules/PossibleFragmentSpreads.js
  231. +3 −3 src/validation/rules/PossibleTypeExtensions.js
  232. +4 −4 src/validation/rules/ProvidedRequiredArguments.js
  233. +3 −3 src/validation/rules/ScalarLeafs.js
  234. +1 −1 src/validation/rules/SingleFieldSubscriptions.js
  235. +1 −1 src/validation/rules/UniqueArgumentNames.js
  236. +1 −1 src/validation/rules/UniqueDirectiveNames.js
  237. +1 −1 src/validation/rules/UniqueDirectivesPerLocation.js
  238. +4 −6 src/validation/rules/UniqueEnumValueNames.js
  239. +4 −6 src/validation/rules/UniqueFieldDefinitionNames.js
  240. +1 −1 src/validation/rules/UniqueFragmentNames.js
  241. +1 −2 src/validation/rules/UniqueInputFieldNames.js
  242. +1 −1 src/validation/rules/UniqueOperationNames.js
  243. +1 −1 src/validation/rules/UniqueOperationTypes.js
  244. +1 −1 src/validation/rules/UniqueTypeNames.js
  245. +1 −1 src/validation/rules/UniqueVariableNames.js
  246. +1 −1 src/validation/rules/ValuesOfCorrectType.js
  247. +2 −2 src/validation/rules/VariablesAreInputTypes.js
  248. +1 −1 src/validation/rules/VariablesInAllowedPosition.js
  249. +1 −1 src/validation/specifiedRules.js
  250. +1 −1 src/validation/validate.js
  251. +894 −1,036 yarn.lock
13 changes: 1 addition & 12 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
module.exports = {
presets: [
['@babel/preset-env', {
targets: [
'node 6',
'ie 9',
'ios 9',
'last 2 chrome versions',
'last 2 edge versions',
'last 2 firefox versions',
],
}],
],
presets: ['@babel/preset-env'],
plugins: [
'./resources/inline-invariant',
'@babel/plugin-transform-flow-strip-types',
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node 6
ie 9
ios 9
last 2 chrome versions
last 2 edge versions
last 2 firefox versions
6 changes: 4 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ rules:
# https://github.com/prettier/eslint-plugin-prettier#installation
prettier/prettier: error

# `eslint-plugin-flowtype` rule list based on `v3.2.0`
# `eslint-plugin-flowtype` rule list based on `v3.4.x`
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype

flowtype/array-style-complex-type: [error, verbose]
@@ -48,6 +48,7 @@ rules:
flowtype/no-dupe-keys: error
flowtype/no-existential-type: off
flowtype/no-flow-fix-me-comments: off
flowtype/no-mixed: off
flowtype/no-mutable-array: off
flowtype/no-primitive-constructor-types: error
flowtype/no-types-missing-file-annotation: error
@@ -73,7 +74,7 @@ rules:
flowtype/valid-syntax: off

##################################################
# ESLint builtin rules list based on `v5.12.x`
# ESLint builtin rules list based on `v5.15.x`
##################################################

# Possible Errors
@@ -186,6 +187,7 @@ rules:
no-void: error
no-warning-comments: off
no-with: error
prefer-named-capture-group: off # ES2018
#prefer-promise-reject-errors: undecided
radix: error
#require-await: undecided
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$DisableFlowOnNegativeTest

[version]
^0.90.0
^0.95.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
# https://www.gitignore.io/

.nyc_output
.eslintcache
node_modules
coverage
dist
5 changes: 5 additions & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
throw-deprecation: true
check-leaks: true
require:
- '@babel/register'
- '@babel/polyfill'
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parser": "flow",
"singleQuote": true,
"trailingComma": "all"
"trailingComma": "all",
"endOfLine": "lf"
}
35 changes: 17 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
git:
depth: 5
language: node_js
cache: yarn

# https://github.com/nodejs/Release
node_js:
@@ -7,27 +10,12 @@ node_js:
- '8'
- '6'

git:
depth: 5

cache: yarn

notifications:
irc:
use_notice: true
on_success: change
on_failure: change
skip_join: true
channels:
- "chat.freenode.net#graphql"
slack:
secure: G7fzaXoPI1cyyW7dlpQ8oG/ot73n4kE83HgbyK1iEN1YBfodsytVgh0jS+zB3DhhRAotS/VfGVz9Wj2Oo109U5w/FyxdMGuKvFan/0B/aAws1sPxLGWA5230u1wTKQCHAu17+yppFOODUu1ILDXaD2A//Wj5iru9M4NnKc1bO6VHkfBHPTLQLbdPHmorwuSH02Ocbh7K4XOWzXRxM6VrwamEn1KnyXGu2w3QdJUT31OjGEEdf6FUzvjwzFgXPhngCw5+enpwm71ljHDNu8YHhXvHtS4328O5pYQO8np7j653HNEqi+ZUiYEOWpwC8be1xHdvi/s32tPFZiCx28ZmDoCUrY744tpPtE6tzuncmSKB0Y3EjutdXBpxllNr5l5hpX5092G2MlpokFbv85J+E2ALcZYNYeFOqTYTKwTYkxK6B1x4amBNpM+FXgUhloK4BK9OT0Qh5SiQOsM8cZT0h6QP91n+REljtpugW3VbuIxq5OJAi42FYbHBC27pohhq6ohU1euZfobk9a7ZawnjoEUk1EZHXiJzYKY/QqzyB6dwk0ersBl3l3OX/wnjwKTkqc9aTmDWo2L+lHaUCXuCY1+KQXsRicfnH395szTJXQbvcbN0zz188gdz6sawzi5BxndWo0NRwZyOG2YcyUHFQR4bK1rL7Lo6t6rijQ/XMeQ=

script:
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then npm run test:ci; else npm run testonly; fi
script: npm run testonly

jobs:
include:
- node_js: 'lts/*'
script: npm run test:ci && bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json
- stage: deploy
if: branch = master OR tag IS present
script: echo "Deploying..."
@@ -47,6 +35,17 @@ jobs:
branch: master
tags: true

notifications:
irc:
use_notice: true
on_success: change
on_failure: change
skip_join: true
channels:
- "chat.freenode.net#graphql"
slack:
secure: G7fzaXoPI1cyyW7dlpQ8oG/ot73n4kE83HgbyK1iEN1YBfodsytVgh0jS+zB3DhhRAotS/VfGVz9Wj2Oo109U5w/FyxdMGuKvFan/0B/aAws1sPxLGWA5230u1wTKQCHAu17+yppFOODUu1ILDXaD2A//Wj5iru9M4NnKc1bO6VHkfBHPTLQLbdPHmorwuSH02Ocbh7K4XOWzXRxM6VrwamEn1KnyXGu2w3QdJUT31OjGEEdf6FUzvjwzFgXPhngCw5+enpwm71ljHDNu8YHhXvHtS4328O5pYQO8np7j653HNEqi+ZUiYEOWpwC8be1xHdvi/s32tPFZiCx28ZmDoCUrY744tpPtE6tzuncmSKB0Y3EjutdXBpxllNr5l5hpX5092G2MlpokFbv85J+E2ALcZYNYeFOqTYTKwTYkxK6B1x4amBNpM+FXgUhloK4BK9OT0Qh5SiQOsM8cZT0h6QP91n+REljtpugW3VbuIxq5OJAi42FYbHBC27pohhq6ohU1euZfobk9a7ZawnjoEUk1EZHXiJzYKY/QqzyB6dwk0ersBl3l3OX/wnjwKTkqc9aTmDWo2L+lHaUCXuCY1+KQXsRicfnH395szTJXQbvcbN0zz188gdz6sawzi5BxndWo0NRwZyOG2YcyUHFQR4bK1rL7Lo6t6rijQ/XMeQ=

env:
global:
secure: "uUjOV39iCLSLtShQfKk9AelIu2PqyKf8dYu4rqVcL5Y9yCHdds1KYysVgCx9XhndrugHNCXWzT/sKDS8voc/NRsfycnvdCIvu+dtBwf9lCHGcMyABFpvsjQfKTGyMCbYNDO8Hd/OQqHCFVj1lh4aNGev8tGqpJoMEDPdQbDKsvMVKWfo9QraXYYK7yh7U2vbidAV+YBj/e3VFfR2UQ+OECHxyxFGxWMbyTF8qRZ7JUsgCaJ82zrx0A7VoEJ6BeXxzhYDPuh3QTON9bXiJpWR/QcsKZNQ7d6Dxf06yo4XQDU9igxe6qst41Hj3IiZzLCyucoPXvoRsbmUcsAVdF4PWq3fnHUmyjRwOMcTjPd2SM4FPJpwnSGZEpstzKSJ3pDzpgRGsF7ai5nGNCes6RCi4AUf96GTjt0JAD+AXwD7mrGlcn4oi0m6r1GcNhDOFsBEgFqz26FXUFQcAqrHzZvsqvG01Cs5pAFMUIEpCyCrkDKClc/LWjJoVInDEVCwGqZk6Qz2XroYjFs25m+aB3ycSIN1qgkTg6szMO76tds4YtL8JDHaAXDbvXAk8YRYbQCAIFQVaIpkp8R1kJa++dP8Q3j/lwAkz+57XJ5KPRlLh7KMqF1joTGKptA0c2vD0sees2RxPrcZGmp6eaOLy3JhQmXfPaRLLpiK+plz6T25f7Y="
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2015-present, Facebook, Inc.
Copyright (c) Facebook, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ The JavaScript reference implementation for GraphQL, a query language for APIs c

[![npm version](https://badge.fury.io/js/graphql.svg)](https://badge.fury.io/js/graphql)
[![Build Status](https://travis-ci.org/graphql/graphql-js.svg?branch=master)](https://travis-ci.org/graphql/graphql-js?branch=master)
[![Coverage Status](https://coveralls.io/repos/graphql/graphql-js/badge.svg?branch=master)](https://coveralls.io/r/graphql/graphql-js?branch=master)
[![Coverage Status](https://codecov.io/gh/graphql/graphql-js/branch/master/graph/badge.svg)](https://codecov.io/gh/graphql/graphql-js)

See more complete documentation at https://graphql.org/ and
https://graphql.org/graphql-js/.
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
codecov:
notify:
require_ci_to_pass: yes

parsers:
javascript:
enable_partials: yes

comment: no
coverage:
status:
project:
default:
target: auto
40 changes: 18 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql",
"version": "14.1.1",
"version": "14.2.0",
"description": "A Query Language and Runtime which can target any service.",
"license": "MIT",
"main": "index",
@@ -24,16 +24,14 @@
"scripts": {
"watch": "node ./resources/watch.js",
"test": "npm run lint && npm run check && npm run testonly",
"test:ci": "npm run lint && npm run check && npm run testonly:coveralls",
"t": "mocha --require @babel/register --require @babel/polyfill",
"testonly": "mocha --throw-deprecation --require @babel/register --require @babel/polyfill --check-leaks --full-trace --timeout 15000 src/**/__tests__/**/*-test.js",
"testonly:cover": "nyc --reporter html --reporter text-summary -- npm run testonly",
"testonly:coveralls": "nyc --silent -- npm run testonly && nyc report --reporter text-lcov | coveralls",
"lint": "eslint --report-unused-disable-directives src || (printf '\\033[33mTry: \\033[7m npm run lint -- --fix \\033[0m\\n' && exit 1)",
"test:ci": "npm run lint -- --no-cache && npm run check && npm run testonly:cover",
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.js",
"testonly:cover": "nyc --clean --skip-full --reporter json --reporter html --reporter text -- npm run testonly",
"lint": "eslint --cache --report-unused-disable-directives src",
"benchmark": "node ./resources/benchmark.js",
"prettier": "prettier --write --list-different 'src/**/*.js'",
"check": "flow check",
"check-cover": "for file in {src/*.js,src/**/*.js}; do echo $file; flow coverage $file; done",
"check-cover": "flow batch-coverage --quiet --strip-root --show-all src/ && flow stop --quiet",
"build": "npm run build:clean && npm run build:cp && npm run build:package-json && npm run build:cjs && npm run build:mjs && npm run build:flow",
"build:clean": "rm -rf ./dist && mkdir ./dist",
"build:cp": "cp README.md LICENSE ./dist",
@@ -51,23 +49,21 @@
},
"devDependencies": {
"@babel/cli": "7.2.3",
"@babel/core": "7.2.2",
"@babel/plugin-transform-flow-strip-types": "7.2.3",
"@babel/polyfill": "7.2.5",
"@babel/preset-env": "7.2.3",
"@babel/register": "7.0.0",
"@babel/core": "7.4.0",
"@babel/plugin-transform-flow-strip-types": "7.4.0",
"@babel/polyfill": "7.4.0",
"@babel/preset-env": "7.4.2",
"@babel/register": "7.4.0",
"babel-eslint": "10.0.1",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"chai": "4.2.0",
"coveralls": "3.0.2",
"eslint": "5.12.0",
"eslint-plugin-flowtype": "3.2.1",
"eslint": "5.15.3",
"eslint-plugin-flowtype": "3.4.2",
"eslint-plugin-prettier": "3.0.1",
"flow-bin": "0.90.0",
"mocha": "5.2.0",
"nyc": "13.1.0",
"prettier": "1.15.3",
"sane": "4.0.2"
"flow-bin": "0.95.1",
"mocha": "6.0.2",
"nyc": "13.3.0",
"prettier": "1.16.4",
"sane": "4.1.0"
}
}
97 changes: 74 additions & 23 deletions resources/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
@@ -9,8 +9,7 @@

'use strict';

const { Suite } = require('benchmark');
const beautifyBenchmark = require('beautify-benchmark');
const { Benchmark } = require('benchmark');
const { execSync } = require('child_process');
const os = require('os');
const fs = require('fs');
@@ -80,28 +79,80 @@ function findFiles(cwd, pattern) {

// Run a given benchmark test with the provided revisions.
function runBenchmark(benchmark, environments) {
const modules = environments.map(({ distPath }) =>
require(path.join(distPath, benchmark))
);
const suite = new Suite(modules[0].name, {
onStart(event) {
console.log('⏱️ ' + event.currentTarget.name);
beautifyBenchmark.reset();
},
onCycle(event) {
beautifyBenchmark.add(event.target);
},
onError(event) {
console.error(event.target.error);
},
onComplete() {
beautifyBenchmark.log();
},
let benchmarkName;
const benches = environments.map(environment => {
const module = require(path.join(environment.distPath, benchmark))
benchmarkName = module.name;
return new Benchmark(environment.revision, module.measure);
});
for (let i = 0; i < environments.length; i++) {
suite.add(environments[i].revision, modules[i].measure);

console.log('⏱️ ' + benchmarkName);
for (let i = 0; i < benches.length; ++i) {
benches[i].run({ async: false });
process.stdout.write(' ' + cyan(i + 1) + ' tests completed.\u000D');
}
console.log('\n');

beautifyBenchmark(benches);
console.log('');
}

function beautifyBenchmark(results) {
const benches = results.map(result => ({
name: result.name,
error: result.error,
ops: result.hz,
deviation: result.stats.rme,
numRuns: result.stats.sample.length,
}));

const nameMaxLen = maxBy(benches, ({ name }) => name.length);
const opsTop = maxBy(benches, ({ ops }) => ops);
const opsMaxLen = maxBy(benches, ({ ops }) => beautifyNumber(ops).length);

for (const bench of benches) {
if (bench.error) {
console.log(' ' + bench.name + ': ' + red(String(bench.error)));
continue;
}

const { name, ops, deviation, numRuns } = bench;
console.log(
' ' + nameStr() + grey(' x ') + opsStr() + ' ops/sec ' +
grey('\xb1') + deviationStr() + cyan('%') +
grey(' (' + numRuns + ' runs sampled)')
);

function nameStr() {
const nameFmt = name.padEnd(nameMaxLen);
return (ops === opsTop) ? green(nameFmt) : nameFmt;
}

function opsStr() {
const percent = ops / opsTop;
const colorFn = percent > 0.95 ? green : (percent > 0.80 ? yellow : red);
return colorFn(beautifyNumber(ops).padStart(opsMaxLen));
}

function deviationStr() {
const colorFn = deviation > 5 ? red : (deviation > 2 ? yellow : green);
return colorFn(deviation.toFixed(2));
}
}
suite.run({ async: false });
}

function red(str) { return '\u001b[31m' + str + '\u001b[0m' }
function green(str) { return '\u001b[32m' + str + '\u001b[0m' }
function yellow(str) { return '\u001b[33m' + str + '\u001b[0m' }
function cyan(str) { return '\u001b[36m' + str + '\u001b[0m' }
function grey(str) { return '\u001b[90m' + str + '\u001b[0m' }

function beautifyNumber(num) {
return Number(num.toFixed(num > 100 ? 0 : 2)).toLocaleString();
}

function maxBy(array, fn) {
return Math.max(...array.map(fn));
}

// Prepare all revisions and run benchmarks matching a pattern against them.
2 changes: 1 addition & 1 deletion resources/copy-package-json.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
2 changes: 1 addition & 1 deletion resources/inline-invariant.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
Loading