File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed
Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Resolve DirectiveLocation with fallback due to graphql breacking changes of module location
3+ */
4+ let DirectiveLocation ;
5+ try {
6+ DirectiveLocation = require ( 'graphql/language/directiveLocation' )
7+ } catch ( e ) {
8+ DirectiveLocation = require ( 'graphql/type/directives' )
9+ }
10+
11+ module . exports = DirectiveLocation
Original file line number Diff line number Diff line change 11import { GraphQLString } from 'graphql' ;
2- import { DirectiveLocation } from 'graphql/language /directiveLocation' ;
2+ import { DirectiveLocation } from '.. /directiveLocation' ;
33import { GraphQLCustomDirective } from '../custom' ;
44
55import numeral from 'numeral' ;
Original file line number Diff line number Diff line change 11import { GraphQLString , GraphQLBoolean } from 'graphql' ;
2- import { DirectiveLocation } from 'graphql/language /directiveLocation' ;
2+ import { DirectiveLocation } from '.. /directiveLocation' ;
33import { GraphQLCustomDirective } from '../custom' ;
44import { _ } from 'lodash' ;
55
Original file line number Diff line number Diff line change 11import { GraphQLString } from 'graphql' ;
2- import { DirectiveLocation } from 'graphql/language /directiveLocation' ;
2+ import { DirectiveLocation } from '.. /directiveLocation' ;
33import { GraphQLCustomDirective } from '../custom' ;
44
55import numeral from 'numeral' ;
Original file line number Diff line number Diff line change 1- import { DirectiveLocation } from 'graphql/language /directiveLocation' ;
1+ import { DirectiveLocation } from '.. /directiveLocation' ;
22import { GraphQLString , GraphQLNonNull } from 'graphql' ;
33import { GraphQLCustomDirective } from '../custom' ;
44
You can’t perform that action at this time.
0 commit comments