diff --git a/scripts/babel-relay-plugin/lib/GraphQLRelayDirective.js b/scripts/babel-relay-plugin/lib/GraphQLRelayDirective.js index 29a5badc81dc7..7932e2c9bd49f 100644 --- a/scripts/babel-relay-plugin/lib/GraphQLRelayDirective.js +++ b/scripts/babel-relay-plugin/lib/GraphQLRelayDirective.js @@ -13,7 +13,12 @@ 'use strict'; -var types = require('./GraphQL').type; +var TypeKind = require('./GraphQL').type_introspection.TypeKind; + +var BOOLEAN = { + kind: TypeKind.SCALAR, + name: 'Boolean' +}; module.exports = { name: 'relay', @@ -21,22 +26,22 @@ module.exports = { args: [{ name: 'isConnectionWithoutNodeID', description: 'Marks a connection field as containing nodes without `id` fields. ' + 'This is used to silence the warning when diffing connections.', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: null }, { name: 'isStaticFragment', description: 'Marks a fragment as static. A static fragment will share the same ' + 'identity regardless of how many times the expression is evaluated.', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: null }, { name: 'pattern', description: 'Marks a fragment as intended for pattern matching (as opposed to ' + 'fetching).', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: null }, { name: 'plural', description: 'Marks a fragment as being backed by a GraphQLList', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: null }], onOperation: false, diff --git a/scripts/babel-relay-plugin/lib/HASH b/scripts/babel-relay-plugin/lib/HASH index ab989bf6e55f4..6ccbede75b49c 100644 --- a/scripts/babel-relay-plugin/lib/HASH +++ b/scripts/babel-relay-plugin/lib/HASH @@ -1 +1 @@ -Zg3QrGbNgpdr/BI9SPAEdd7NRLA= \ No newline at end of file +cRDRB56Au9mTP+fcN+3aKAhi/xE= \ No newline at end of file diff --git a/scripts/babel-relay-plugin/src/GraphQLRelayDirective.js b/scripts/babel-relay-plugin/src/GraphQLRelayDirective.js index 8faa129f0c2cb..34549e7ce1d09 100644 --- a/scripts/babel-relay-plugin/src/GraphQLRelayDirective.js +++ b/scripts/babel-relay-plugin/src/GraphQLRelayDirective.js @@ -12,7 +12,12 @@ 'use strict'; -const types = require('./GraphQL').type; +const TypeKind = require('./GraphQL').type_introspection.TypeKind; + +const BOOLEAN = { + kind: TypeKind.SCALAR, + name: 'Boolean', +}; module.exports = { name: 'relay', @@ -23,7 +28,7 @@ module.exports = { description: 'Marks a connection field as containing nodes without `id` fields. ' + 'This is used to silence the warning when diffing connections.', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: (null: ?boolean), }, { @@ -31,7 +36,7 @@ module.exports = { description: 'Marks a fragment as static. A static fragment will share the same ' + 'identity regardless of how many times the expression is evaluated.', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: (null: ?boolean), }, { @@ -39,13 +44,13 @@ module.exports = { description: 'Marks a fragment as intended for pattern matching (as opposed to ' + 'fetching).', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: (null: ?boolean), }, { name: 'plural', description: 'Marks a fragment as being backed by a GraphQLList', - type: types.GraphQLBoolean, + type: BOOLEAN, defaultValue: (null: ?boolean), }, ],