forked from graphql/graphql-js
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows to add schema definition missing in the original schema (graph…
…ql#1441) Split out from graphql#1438 Allows to inject directives and types into SDL-based schema: ```js import { GrapQLDateTime } from 'somepackage'; let schema = new GraphQLSchema({ types: [GrapQLDateTime], }); const ast = parse(` type Query { timestamp: DateTime } `); schema = extendSchema(schema, ast); ``` ```js let schema = new GraphQLSchema({ directives: [ new GraphQLDirective({ name: 'onSchema', locations: ['SCHEMA'], }), ], }); const ast = parse(` schema @onSchema { query: Foo } type Foo { bar: String } `); schema = extendSchema(schema, ast); ```
- Loading branch information
1 parent
732c90f
commit a1ee52a
Showing
2 changed files
with
72 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters