• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

graphql / graphql-js
98%
master: 98%

Build:
Build:
LAST BUILD BRANCH: directives
DEFAULT BRANCH: master
Repo Added 07 Jul 2015 01:29AM CUT
Files 0
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH within-between
branch: within-between
CHANGE BRANCH
x
Reset
  • within-between
  • 0.1.10
  • 0.1.3
  • 0.1.4
  • 0.1.5
  • 0.1.6
  • 0.1.7
  • 0.1.9
  • 0.2.3
  • accept-source
  • allow-safe-divergence
  • allowLegacySDLEmptyFields
  • allowedLegacyNames
  • args-vars-normal-objs
  • arity
  • ast-skip-include
  • async-map-value-flow
  • babel-async-await
  • babel6
  • benchmark
  • better-buildClientSchema-errors
  • better-no-unused-fragments
  • better-predicates
  • better-schema-errors
  • build-client-schema
  • build-nits
  • buildSchema-options
  • bump-rc
  • bump-version
  • cleanupBenchmark
  • common-root-types
  • const-params
  • context
  • context-type
  • control-badness
  • covariance
  • covariant-wrappers
  • coveralls
  • coveralls2
  • default-resolve
  • dep-bump
  • deprecated-directive
  • deprecated-extend
  • deprecation-introspection
  • deprecation-notices
  • dev-only-instanceof
  • dherault-master
  • didyoumean
  • directive-lang
  • directive-on-schema
  • directives
  • diverging-directives
  • dunder-warn
  • enum-value
  • error-return
  • errormessage
  • eslint
  • eslint-bump
  • execute-sync-serial
  • execute-with-client-schema
  • executeOperation
  • executor-experiment
  • export-directives
  • export-executable
  • export-missing-types
  • export-modules
  • export-rules
  • export-types
  • export-validate-with
  • extend-schema
  • failing-subscription-test
  • fast-cycle-detection
  • field-error-on-bad-scalar
  • find-deprecated
  • fine-grain-directives
  • fix-1205
  • fix-832
  • fix-850
  • fix-910
  • fix-astFromValue
  • fix-master-builds
  • fix-printError
  • fix-rearranged-schema-printing
  • fix-reserved-names
  • fix-reserved-properties
  • fix-type-info
  • fix-validation-recursion
  • fixinterface
  • fixloop
  • flow-61
  • flow-66
  • flow-fix
  • flow-schema-printer
  • flow-visitor
  • format-path
  • fragment-vars-validate
  • get-operation
  • grammar-pass
  • graphql-error-constructor
  • graphql-tools
  • greenkeeper-babel-cli-6.18.0
  • greenkeeper-babel-eslint-7.1.0
  • greenkeeper-babel-plugin-transform-class-properties-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-block-scoping-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-classes-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-destructuring-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-modules-commonjs-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-parameters-6.18.0
  • greenkeeper-babel-plugin-transform-es2015-shorthand-properties-6.18.0
  • greenkeeper-babel-plugin-transform-flow-strip-types-6.18.0
  • greenkeeper-eslint-3.8.0
  • greenkeeper-eslint-3.8.1
  • greenkeeper-eslint-plugin-flowtype-2.21.0
  • greenkeeper-eslint-plugin-flowtype-2.22.0
  • greenkeeper-eslint-plugin-flowtype-2.23.0
  • greenkeeper-eslint-plugin-flowtype-2.23.1
  • greenkeeper-mocha-3.1.2
  • greenkeeper/babel-cli-6.22.2
  • greenkeeper/babel-cli-6.24.1
  • greenkeeper/babel-eslint-7.1.1
  • greenkeeper/babel-eslint-7.2.0
  • greenkeeper/babel-eslint-7.2.1
  • greenkeeper/babel-eslint-7.2.2
  • greenkeeper/babel-eslint-7.2.3
  • greenkeeper/babel-plugin-check-es2015-constants-6.22.0
  • greenkeeper/babel-plugin-transform-class-properties-6.19.0
  • greenkeeper/babel-plugin-transform-class-properties-6.22.0
  • greenkeeper/babel-plugin-transform-class-properties-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-block-scoping-6.20.0
  • greenkeeper/babel-plugin-transform-es2015-block-scoping-6.21.0
  • greenkeeper/babel-plugin-transform-es2015-block-scoping-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-classes-6.23.0
  • greenkeeper/babel-plugin-transform-es2015-classes-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-computed-properties-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-destructuring-6.23.0
  • greenkeeper/babel-plugin-transform-es2015-duplicate-keys-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-function-name-6.22.0
  • greenkeeper/babel-plugin-transform-es2015-function-name-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-modules-commonjs-6.23.0
  • greenkeeper/babel-plugin-transform-es2015-modules-commonjs-6.24.0
  • greenkeeper/babel-plugin-transform-es2015-modules-commonjs-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-object-super-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-parameters-6.21.0
  • greenkeeper/babel-plugin-transform-es2015-parameters-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-shorthand-properties-6.24.1
  • greenkeeper/babel-plugin-transform-es2015-template-literals-6.22.0
  • greenkeeper/babel-plugin-transform-flow-strip-types-6.21.0
  • greenkeeper/babel-plugin-transform-object-rest-spread-6.19.0
  • greenkeeper/babel-plugin-transform-object-rest-spread-6.20.2
  • greenkeeper/babel-plugin-transform-object-rest-spread-6.22.0
  • greenkeeper/babel-plugin-transform-object-rest-spread-6.23.0
  • greenkeeper/babel-plugin-transform-regenerator-6.20.0
  • greenkeeper/babel-plugin-transform-regenerator-6.21.0
  • greenkeeper/babel-plugin-transform-regenerator-6.24.1
  • greenkeeper/chai-4.0.2
  • greenkeeper/chai-4.1.0
  • greenkeeper/chai-4.1.1
  • greenkeeper/chai-subset-1.4.0
  • greenkeeper/chai-subset-1.5.0
  • greenkeeper/coveralls-2.11.15
  • greenkeeper/coveralls-2.11.16
  • greenkeeper/coveralls-2.12.0
  • greenkeeper/coveralls-2.13.0
  • greenkeeper/coveralls-2.13.1
  • greenkeeper/eslint-3.10.0
  • greenkeeper/eslint-3.10.1
  • greenkeeper/eslint-3.10.2
  • greenkeeper/eslint-3.11.0
  • greenkeeper/eslint-3.11.1
  • greenkeeper/eslint-3.12.0
  • greenkeeper/eslint-3.12.1
  • greenkeeper/eslint-3.12.2
  • greenkeeper/eslint-3.13.0
  • greenkeeper/eslint-3.13.1
  • greenkeeper/eslint-3.14.0
  • greenkeeper/eslint-3.14.1
  • greenkeeper/eslint-3.15.0
  • greenkeeper/eslint-3.16.0
  • greenkeeper/eslint-3.16.1
  • greenkeeper/eslint-3.17.0
  • greenkeeper/eslint-3.17.1
  • greenkeeper/eslint-3.18.0
  • greenkeeper/eslint-3.19.0
  • greenkeeper/eslint-4.1.1
  • greenkeeper/eslint-4.2.0
  • greenkeeper/eslint-4.3.0
  • greenkeeper/eslint-4.4.0
  • greenkeeper/eslint-4.4.1
  • greenkeeper/eslint-plugin-babel-4.0.0
  • greenkeeper/eslint-plugin-babel-4.0.1
  • greenkeeper/eslint-plugin-babel-4.1.0
  • greenkeeper/eslint-plugin-babel-4.1.1
  • greenkeeper/eslint-plugin-babel-4.1.2
  • greenkeeper/eslint-plugin-flowtype-2.26.0
  • greenkeeper/eslint-plugin-flowtype-2.26.1
  • greenkeeper/eslint-plugin-flowtype-2.27.0
  • greenkeeper/eslint-plugin-flowtype-2.27.1
  • greenkeeper/eslint-plugin-flowtype-2.28.0
  • greenkeeper/eslint-plugin-flowtype-2.28.1
  • greenkeeper/eslint-plugin-flowtype-2.28.2
  • greenkeeper/eslint-plugin-flowtype-2.29.0
  • greenkeeper/eslint-plugin-flowtype-2.29.1
  • greenkeeper/eslint-plugin-flowtype-2.29.2
  • greenkeeper/eslint-plugin-flowtype-2.30.0
  • greenkeeper/eslint-plugin-flowtype-2.30.1
  • greenkeeper/eslint-plugin-flowtype-2.30.2
  • greenkeeper/eslint-plugin-flowtype-2.30.3
  • greenkeeper/eslint-plugin-flowtype-2.31.0
  • greenkeeper/eslint-plugin-flowtype-2.32.0
  • greenkeeper/eslint-plugin-flowtype-2.32.1
  • greenkeeper/eslint-plugin-flowtype-2.33.0
  • greenkeeper/eslint-plugin-flowtype-2.34.1
  • greenkeeper/eslint-plugin-flowtype-2.35.0
  • greenkeeper/flow-bin-0.35.0
  • greenkeeper/flow-bin-0.36.0
  • greenkeeper/flow-bin-0.37.0
  • greenkeeper/flow-bin-0.37.1
  • greenkeeper/flow-bin-0.37.3
  • greenkeeper/flow-bin-0.37.4
  • greenkeeper/flow-bin-0.39.0
  • greenkeeper/flow-bin-0.40.0
  • greenkeeper/flow-bin-0.41.0
  • greenkeeper/flow-bin-0.42.0
  • greenkeeper/flow-bin-0.43.0
  • greenkeeper/flow-bin-0.43.1
  • greenkeeper/flow-bin-0.44.0
  • greenkeeper/flow-bin-0.44.2
  • greenkeeper/flow-bin-0.45.0
  • greenkeeper/flow-bin-0.46.0
  • greenkeeper/flow-bin-0.47.0
  • greenkeeper/flow-bin-0.48.0
  • greenkeeper/flow-bin-0.49.1
  • greenkeeper/flow-bin-0.50.0
  • greenkeeper/flow-bin-0.51.0
  • greenkeeper/flow-bin-0.51.1
  • greenkeeper/flow-bin-0.52.0
  • greenkeeper/iterall-1.0.3
  • greenkeeper/iterall-1.1.1
  • greenkeeper/mocha-3.2.0
  • greenkeeper/mocha-3.3.0
  • greenkeeper/mocha-3.4.0
  • greenkeeper/mocha-3.4.1
  • greenkeeper/mocha-3.4.2
  • greenkeeper/mocha-3.5.0
  • greenkeeper/remove-node-0.10
  • greenkeeper/sane-1.5.0
  • greenkeeper/sane-1.6.0
  • greenkeeper/sane-1.7.0
  • greenkeeper/sane-2.0.0
  • hero
  • improve-aggregate-types
  • improve-aimapper
  • improve-inspect
  • inline-fragment-op-type
  • input-validation-string-array
  • inspect-methods
  • int-coercion
  • interface-no-implementors
  • interfaceinvariant
  • introspection-changes
  • introspection-types
  • is-leaf
  • is-valid-value
  • isDeprecated
  • isPromise
  • iter-values
  • json-error
  • json-serialize-types
  • kassens-patch-1
  • land-pretty-printer
  • latest-node
  • legacy-configs
  • linked-list-path
  • listbadchar
  • literal-validation
  • located-errors
  • master
  • memo-collect-subfields
  • memo-variable-use
  • mgrenier-extend-enum-input
  • minor-move
  • minor-spec-compliance-sdl
  • missing-subscription-field
  • module-mjs
  • more-ast-visitor
  • more-context-type
  • moreargs
  • mutationname
  • namedtype
  • namesuggestions
  • new-license
  • no-catch
  • no-format
  • no-name-warning
  • no-visitSpreadFragments
  • npm-git
  • null-variables
  • obj-args
  • optional-op-name
  • parallel-validator
  • parse-into-objects
  • parse-objects
  • parse-type
  • pre-pipe-second-pass
  • preserve-coercion-errors
  • prettier
  • pretty-printer
  • print-fix-descriptions
  • print-schema
  • printError
  • printer
  • provide-field-resolver
  • readonly-ast
  • readonly-ast-2
  • readonly-errors
  • remove-deprecated-introspection-fields
  • remove-experimental-const-params
  • removeIgnoredTokens
  • reportError
  • requestdoc
  • return-type-validation
  • revert-371-drop-instanceof
  • rfc-docstring
  • rfc-interface-implementors
  • rfc-lang
  • rfc-longstring
  • rfc-type-extension
  • rm-name-validation-edge
  • scalar-type
  • schema
  • schema-ast-printer
  • schema-def
  • schema-directives
  • schema-dsl
  • schema-extension
  • schema-lang-descriptions
  • schema-language-reorg
  • schema-scalar-of-type
  • schema-type-default-args
  • sdl-changes
  • sdl-grammar-formatting
  • sdl-implements-multiple-interfaces
  • sdl-improvements
  • separate-operations
  • serialize-nulls
  • simplify-arg-validation
  • simplify-subscriptions
  • single-node-error
  • spec-subscriptions-multi-field
  • strict-args
  • strict-coercion
  • strict-inputs
  • subscription-capture-source-errors
  • subscription-locate-failed-source
  • subscription-promise-union
  • subscription-setup-error
  • subscription-test-source-errors
  • sync-execute
  • test-non-keywords
  • test-parsing-extension
  • test-strict-numbers
  • tgriesser-schema-types
  • thenable
  • to-introspection
  • tokensss
  • tools
  • travis-node-lts
  • travis-stages
  • type-args-any
  • type-checks
  • type-info-safe
  • type-invariants
  • type-test
  • typed-constructors
  • unify-build-script
  • unique-input-fields
  • update-deps
  • update-dev-deps
  • update-travis
  • v0.1.11
  • v0.1.12
  • v0.10.0
  • v0.10.1
  • v0.10.2
  • v0.10.3
  • v0.10.4
  • v0.10.5
  • v0.10.6
  • v0.11.0
  • v0.11.1
  • v0.11.2
  • v0.11.3
  • v0.11.4
  • v0.11.5
  • v0.11.6
  • v0.11.7
  • v0.12.0
  • v0.12.1
  • v0.12.2
  • v0.12.3
  • v0.13.0
  • v0.13.0-rc.1
  • v0.13.1
  • v0.13.2
  • v0.2.0
  • v0.2.1
  • v0.2.2
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.3.0
  • v0.4.0
  • v0.4.1
  • v0.4.10
  • v0.4.11
  • v0.4.12
  • v0.4.13
  • v0.4.14
  • v0.4.15
  • v0.4.16
  • v0.4.17
  • v0.4.2
  • v0.4.3
  • v0.4.4
  • v0.4.5
  • v0.4.6
  • v0.4.7
  • v0.4.8
  • v0.4.9
  • v0.5.0-beta.1
  • v0.6.0
  • v0.6.1
  • v0.6.2
  • v0.7.0
  • v0.7.1
  • v0.7.2
  • v0.8.0
  • v0.8.0-beta1
  • v0.8.0-beta2
  • v0.8.0-beta3
  • v0.8.1
  • v0.8.2
  • v0.9.0
  • v0.9.1
  • v0.9.2
  • v0.9.3
  • v0.9.4
  • v0.9.5
  • v0.9.6
  • v14.0.0
  • v14.0.0-rc.1
  • v14.0.0-rc.2
  • v14.0.1
  • v14.0.2
  • v14.1.0
  • v14.1.1
  • validate-schema-directives
  • validate-schema-types
  • validate-top-level-schema
  • validation-speedup
  • validation-unique-directive-names
  • value-node-typo
  • var-directive-not-experimental
  • vardefs-test
  • variable-directive-flag
  • version-14-rc
  • visit-return-any
  • without-experimental-flow
  • yarnlock

pending completion
998

push

travis-ci

leebyron
Validation: improving overlapping fields quality

This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking fields "between" two different collections of fields. This ensures for deeply overlapping fields that nested fields are not checked against each other repeatedly. Extending this concept further, fragment spreads are no longer expanded inline before looking for conflicts, instead the fields within a fragment are compared to the fields with the selection set which contained the referencing fragment spread.

e.g.

```graphql
{
  same: a
  same: b
  ...X
}

fragment X on T {
  same: c
  same: d
}
```

In the above example, the initial query body is checked "within" so `a` is compared to `b`. Also, the fragment `X` is checked "within" so `c` is compared to `d`. Because of the fragment spread, the query body and fragment `X` are checked "between" so that `a` and `b` are each compared to `c` and `d`. In this trivial example, no fewer checks are performed, but in the case where fragments are referenced multiple times, this reduces the overall number of checks (regardless of memoization).

**BREAKING**: This can change the order of fields reported when a conflict arises when fragment spreads are involved. If you are checking the precise output of errors (e.g. for unit tests), you may find existing errors change from `"a" and "c" are different fields` to `"c" and "a" are different fields`.

From a perf point of view, this is fairly minor as the memoization "PairSet" was already keeping these repeated checks from consuming time, however this will reduce the number of memoized hits because of the algorithm improvement.

From an error reporting point of view, this reports nearest-common-ancestor issues when found in a fragment that comes later in the validation process. I've added a test which fails with the existing impl ... (continued)

114 of 114 new or added lines in 2 files covered. (100.0%)

6999 of 7121 relevant lines covered (98.29%)

1368.62 hits per line

Relevant lines Covered
Build:
Build:
7121 RELEVANT LINES 6999 COVERED LINES
1368.62 HITS PER LINE
Source Files on within-between
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
998 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 09:52PM CUT leebyron travis-ci pending completion  
996 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 08:11PM CUT leebyron travis-ci pending completion  
994 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 07:10PM CUT leebyron travis-ci pending completion  
992 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 06:23AM CUT leebyron travis-ci pending completion  
990 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 05:52AM CUT leebyron travis-ci pending completion  
988 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 05:37AM CUT leebyron travis-ci pending completion  
986 within-between Validation: improving overlapping fields quality This improves the overlapping fields validation performance and improves error reporting quality by separating the concepts of checking fields "within" a single collection of fields from checking f... push 10 May 2016 05:25AM CUT leebyron travis-ci pending completion  
See All Builds (3630)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc