Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
22 lines
926 B
Plaintext
22 lines
926 B
Plaintext
/* eslint-disable @typescript-eslint/ban-types */
|
|
import { GraphQLScalarType } from 'graphql';
|
|
import { ensureObject, parseObject } from './utils.js';
|
|
const specifiedByURL = 'http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf';
|
|
export const GraphQLJSONObjectConfig = /*#__PURE__*/ {
|
|
name: 'JSONObject',
|
|
description: 'The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).',
|
|
serialize: ensureObject,
|
|
parseValue: ensureObject,
|
|
parseLiteral: parseObject,
|
|
specifiedByURL,
|
|
specifiedByUrl: specifiedByURL,
|
|
extensions: {
|
|
codegenScalarType: 'Record<string, any>',
|
|
jsonSchema: {
|
|
type: 'object',
|
|
additionalProperties: true,
|
|
},
|
|
},
|
|
};
|
|
export const GraphQLJSONObject = /*#__PURE__*/ new GraphQLScalarType(GraphQLJSONObjectConfig);
|