Change log

vNEXT

v3.1.1

  • Update the required-fields rule to handle inline fragments without field ancestors. PR #240 by Henry Q. Dineen

v3.1.0

  • Fix an issue that caused graphql/required-fields to throw on non-existent field references. PR #231 by Vitor Balocco
  • chore: Update dependency graphql-tools to v4.0.5. PR #239
  • chore: Update dependency eslint to v5.16.0. PR #218
  • chore: Update dependency graphql to v14.4.2. PR #220
  • chore: Update dependency test-all-versions to v4.1.1. PR #230
  • chore: Update dependency lodash to v4.17.13. PR #234
  • chore: Update dependency mocha to v6. PR #213
  • chore: Running prettier on all files PR #237

v3.0.3

  • chore: Update dependency graphql-tools to v4.0.4. PR #210
  • chore: Update dependency eslint to v5.12.1. PR #206
  • chore: Update dependency graphql to v14.1.1. PR #208

v3.0.2

  • Fix regression which caused graphql/required-fields to throw on non-existent field references. PR #203 by Matt Bretl

v3.0.1

v3.0.0

  • BREAKING: The required-fields rule has been significantly changed to make it a completely reliable method of ensuring an id field (or any other field name) is always requested when available. PR #199 Here is the behavior, let's say we are requiring field id:
    • On any field whose return type defines a field called id, the selection set must directly contain id.
    • In any named fragment declaration whose type defines a field called id, the selection set must directly contain id.
    • An inline fragment whose type defines a field called id must contain id in its selection set unless its parent is also an inline fragment that contains the field id.
    • Here's a specific case which is no longer valid:
      • query { greetings { hello ... on Greetings { id } } }
      • This must now be written as query { greetings { id hello ... on Greetings { id } } }
    • This is a more conservative approach than before, driven by the fact that it's quite hard to ensure that a combination of inline fragments actually covers all of the possible types of a selection set.
  • Fix breaking change in graphql@^14.0.0 that renamed ProvidedNonNullArguments to ProvidedRequiredArguments #192
  • Update dependencies to graphql-tools 4 and eslint 5.9 #193

v2.1.1

  • Fix support for InlineFragments with the required-fields rule in #140 by Steve Hollaar
  • Fix error location information for literal .graphql files and strings with leading newlines in #122 by Dan Freeman
  • Add fraql environment

v2.1.0

  • Retrieves .graphqlconfig relative to the file being linted, which re-enables support for vscode-eslint using .graphqlconfig in #108 by [Jon Wong][https://github.com/jnwng/]
  • Cache schema reading/parsing results each time a rule is created in #137 by Kristján Oddsson

v2.0.0

v1.5.0

v1.4.1

Skipped v1.4.0 because of incorrect version tag in package.json

v1.3.0

v1.2.0

v1.1.0

v1.0.0

v0.8.2

  • Remove KnownFragmentNames and UnusedFragment from default rules in literal env. Justin Schulz in #70

v0.8.1

  • Fix graphql/required-fields throwing on non-existent field reference Benjie in #65

v0.8.0

  • Updated graphql dependency to resolve test failures (wording change, no API change) jnwng
  • Add lint rule to enforce that required fields are specified. rgoldfinger in #47

v0.7.0

  • Add lint rule to enforce that operations have names gauravmk in #47

v0.6.1

  • Remove babel-polyfill from runtime dependencies, since it was only being used in test code. joelgriffith in #44

v0.6.0

v0.5.0

  • Take into account Apollo fragment interpolation rules jnwng in #33
  • Update graphql-js dependency to 0.8.2 jonbretman in #40

v0.4.3

  • Add 'literal' option to options schema, so that it can actually be used. stefanorg in #39

v0.4.2

  • Added 'literal' option to env for when working with .graphql and .gql files, by jtmthf in #36

v0.4.1

  • Support for selecting validation rules one by one, by erydo in #34

v0.4.0

v0.3.1

  • We didn't keep track of changes before this version. Consult the commit log.