UNPKG

gql-string-to-object

Version:

Helper function to convert GQL strings to objects!

7 lines (6 loc) 450 B
/** Will convert gql string into objects * @params {string} gqlString - GraphQL string that needs to be converted * @params {string array} fragments - [optional] if you have nested fragments, make sure to enter them in an increasing fashion. Smallest, not nested first such as [simpleFragment, simpleFragment, nestedFragment] */ declare const gqlToObject: (gqlString: string, fragments?: string[]) => RecursiveObject; export default gqlToObject;