graphql-extra
graphql-extra copied to clipboard
Node "type" raw string: "Maximum call stack exceeded"
If you try to t.objectType
or any of it's variants, and then document.createObjectType
or document.upsertObjectType()
when the type
value is a a string (or basically anything but the hack using t.scalarType().name
it throws Maximum call stack exceeded
from the call to cloneDeep
in utils
file:
`
Demo here: https://repl.it/@GavinRay97/AquamarineGoldFibonacci
const mutation = t.mutationType({
fields: [
t.fieldDef({
name: 'test',
arguments: [
t.inputVal({
name: 'val1',
type: 'Int',
}),
],
}),
],
})
This works, but nothing else does:
const mutation = t.mutationType({
fields: [
t.fieldDef({
name: 'test',
arguments: [
t.inputVal({
name: 'val1',
type: t.scalarType({ name: "Int!" }).name
}),
],
}),
],
})