Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions src/type/__tests__/introspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,13 @@ describe('Introspection', () => {
name: 'onOperation',
args: [],
type: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
kind: 'NON_NULL',
name: null,
ofType: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
},
},
isDeprecated: false,
deprecationReason: null
Expand All @@ -662,9 +666,13 @@ describe('Introspection', () => {
name: 'onFragment',
args: [],
type: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
kind: 'NON_NULL',
name: null,
ofType: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
},
},
isDeprecated: false,
deprecationReason: null
Expand All @@ -673,9 +681,13 @@ describe('Introspection', () => {
name: 'onField',
args: [],
type: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
kind: 'NON_NULL',
name: null,
ofType: {
kind: 'SCALAR',
name: 'Boolean',
ofType: null,
},
},
isDeprecated: false,
deprecationReason: null
Expand Down
6 changes: 3 additions & 3 deletions src/type/__tests__/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,9 @@ type __Directive {
name: String!
description: String
args: [__InputValue!]!
onOperation: Boolean
onFragment: Boolean
onField: Boolean
onOperation: Boolean!
onFragment: Boolean!
onField: Boolean!
}

type __EnumValue {
Expand Down
6 changes: 3 additions & 3 deletions src/type/introspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ var __Directive = new GraphQLObjectType({
new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),
resolve: directive => directive.args || []
},
onOperation: { type: GraphQLBoolean },
onFragment: { type: GraphQLBoolean },
onField: { type: GraphQLBoolean },
onOperation: { type: new GraphQLNonNull(GraphQLBoolean) },
onFragment: { type: new GraphQLNonNull(GraphQLBoolean) },
onField: { type: new GraphQLNonNull(GraphQLBoolean) },
}),
});

Expand Down