MCPcopy Create free account
hub / github.com/ardatan/graphql-tools / assertObjectTypeDefinitionNode

Function assertObjectTypeDefinitionNode

packages/testing/assertion.ts:66–73  ·  view source on GitHub ↗
(
  input: ASTNode,
)

Source from the content-addressed store, hash-verified

64 throw new Error('Expected EnumTypeDefinitionNode.');
65}
66export function assertObjectTypeDefinitionNode(
67 input: ASTNode,
68): asserts input is ObjectTypeDefinitionNode {
69 if (input.kind === 'ObjectTypeDefinition') {
70 return;
71 }
72 throw new Error(`Expected ObjectTypeDefinitionNode. Got ${input.kind}`);
73}
74export function assertInterfaceTypeDefinitionNode(
75 input: ASTNode,
76): asserts input is InterfaceTypeDefinitionNode {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected