UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

17 lines (16 loc) 364 B
import { Kind } from 'graphql'; export function getDescriptionNode(obj) { if (obj.astNode?.description) { return { ...obj.astNode.description, block: true, }; } if (obj.description) { return { kind: Kind.STRING, value: obj.description, block: true, }; } }