How to use the graphql-type-json.parseLiteral 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 CodeCommission / subkit / lib / custom-directives.js View on Github external
for (const arg of directive.arguments) {
    args[arg.name.value] =
      arg.value.kind === 'StringValue'
        ? format(
            arg.value.value,
            Object.assign(
              {},
              {
                parent: source,
                args: fieldArgs,
                context
              }
            ),
            {partial: true}
          )
        : arg.value.value || GraphQLJSON.parseLiteral(arg.value);
  }
  args = Object.assign({}, args, fieldArgs);

  return (
    directiveConfig &&
    directiveConfig.resolve &&
    directiveConfig.resolve(resolve, source, args, context, info)
  );
}
github ConduitVC / aws-utils / packages / appsync-emulator-serverless / schemaWrapper.js View on Github external
parseLiteral(value) {
    return GraphQLJSON.parseLiteral(value);
  },
});