How to use the graphql-type-json.description function in graphql-type-json

To help you get started, we’ve selected a few graphql-type-json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ConduitVC / aws-utils / packages / appsync-emulator-serverless / schemaWrapper.js View on Github external
name: 'AWSDateTime',
  description: GraphQLDateTime.description,
  serialize(value) {
    return GraphQLDateTime.serialize(value);
  },
  parseValue(value) {
    return GraphQLDateTime.parseValue(value) ? value : undefined;
  },
  parseLiteral(value) {
    return GraphQLDateTime.parseLiteral(value) ? value.value : undefined;
  },
});

const AWSJSON = new GraphQLScalarType({
  name: 'AWSJSON',
  description: GraphQLJSON.description,
  serialize(value) {
    return JSON.stringify(GraphQLJSON.serialize(value));
  },
  parseValue(value) {
    return GraphQLJSON.parseValue(value);
  },
  parseLiteral(value) {
    return GraphQLJSON.parseLiteral(value);
  },
});

const scalars = {
  AWSJSON,
  AWSDate,
  AWSTime,
  AWSDateTime,