Skip to content

Commit

Permalink
use getDescription from graphql package (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
Divyendu Singh authored and Sashko Stubailo committed Jul 19, 2018
1 parent d33ea90 commit c77e3c2
Show file tree
Hide file tree
Showing 8 changed files with 812 additions and 198 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ script:
sudo: false

env:
- GRAPHQL_VERSION='^0.12'
- GRAPHQL_VERSION='^0.13'
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change log

* Use `getDescription` from `graphql-js` package [PR #672](https://github.com/apollographql/graphql-tools/pull/672)

### v3.0.5

* Update apollo-link to 1.2.2 [#785](https://github.com/apollographql/graphql-tools/pull/785)
Expand All @@ -18,7 +20,6 @@
[Issue #753](https://github.com/apollographql/graphql-tools/issues/753)
[PR #806](https://github.com/apollographql/graphql-tools/pull/806)


### v3.0.2

* Fixed duplicate fragments getting added during transform in `FilterToSchema` [#778](https://github.com/apollographql/graphql-tools/pull/778)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"uuid": "^3.1.0"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0"
"graphql": "^0.13.0"
},
"devDependencies": {
"@types/chai": "4.0.10",
"@types/graphql": "0.11.7",
"@types/graphql": "0.12.5",
"@types/dateformat": "^1.0.1",
"@types/mocha": "^2.2.44",
"@types/node": "^8.0.47",
Expand Down
5 changes: 0 additions & 5 deletions src/generate/extractExtensionDefinitions.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { DocumentNode, DefinitionNode } from 'graphql';

// This was changed in graphql@0.12
// See https://github.com/apollographql/graphql-tools/pull/541
// TODO fix types https://github.com/apollographql/graphql-tools/issues/542
const oldTypeExtensionDefinitionKind = 'TypeExtensionDefinition';
const newExtensionDefinitionKind = 'ObjectTypeExtension';
const interfaceExtensionDefinitionKind = 'InterfaceTypeExtension';

export default function extractExtensionDefinitions(ast: DocumentNode) {
const extensionDefs = ast.definitions.filter(
(def: DefinitionNode) =>
def.kind === oldTypeExtensionDefinitionKind ||
(def.kind as any) === newExtensionDefinitionKind ||
(def.kind as any) === interfaceExtensionDefinitionKind,
);
Expand Down
Loading

0 comments on commit c77e3c2

Please sign in to comment.