UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

6 lines (5 loc) 188 B
import { parse } from 'graphql'; export function parseSelectionSet(selectionSet, options) { const query = parse(selectionSet, options).definitions[0]; return query.selectionSet; }