Files
30-seconds-of-code/node_modules/graphql-compose/esm/directive/default.js
2019-08-20 15:52:05 +02:00

12 lines
374 B
JavaScript

import { GraphQLDirective, DirectiveLocation, GraphQLNonNull } from '../graphql';
import GraphQLJSON from '../type/json';
export default new GraphQLDirective({
name: 'default',
description: 'Provides default value for input field.',
locations: [DirectiveLocation.INPUT_FIELD_DEFINITION],
args: {
value: {
type: new GraphQLNonNull(GraphQLJSON)
}
}
});