simple-graphql
Version:
The simple way to generates GraphQL schemas and Sequelize models from your models definition.
12 lines (11 loc) • 362 B
TypeScript
import { FragmentDefinitionNode, SelectionNode } from 'graphql';
export type Selection = {
namedType?: string;
name: string;
selections?: Array<Selection>;
};
export default function parseSelections(fragments: {
[key: string]: FragmentDefinitionNode;
}, selections?: ReadonlyArray<SelectionNode>, base?: {
namedType: string;
}): Selection[];