UNPKG

graphql-query-builder-json

Version:

This is a query builder to build any query, mutation, subscription from a json object

25 lines (24 loc) 542 B
interface IVariables { [key: string]: IVariables | string | number | Date | [IVariables]; } interface IMap { type?: "interface" | "union"; entity: string; project?: Array<IMap | string>; args?: IArgs[]; } interface IArgs { name: string; graphQlType: string; value: any; } interface InputPayload { type: "query" | "mutation" | "subscription"; name: string; map: IMap; } declare const build: (input: InputPayload) => { query: string; variables: IVariables; }; export { build, InputPayload };