Skip to content

Instantly share code, notes, and snippets.

@drejohnson
Created December 3, 2017 20:06
Show Gist options
  • Save drejohnson/df3598966f056a2abd0a35c450effabd to your computer and use it in GitHub Desktop.
Save drejohnson/df3598966f056a2abd0a35c450effabd to your computer and use it in GitHub Desktop.
type selection = {
.
"alias": string,
"arguments": Js.Array.t(string),
"directives": Js.Array.t(string),
"kind": string,
"name": {
.
"kind": string,
"value": string
},
"selectionSet": {
.
"kind": string,
"selections": Js.Array.t(selection)
}
};
type definition = {
.
"directives": Js.Array.t(string),
"name": {
.
"kind": string,
"value": string
},
"operation": string,
"selectionSet": {
.
"kind": string,
"selections": Js.Array.t(selection)
},
"loc": {
.
"_end": int,
"start": int
},
"kind": string
};
type definitions = Js.Array.t(definition);
[@bs.module "graphql-tag"] external _gql : string => definitions = "default";
let gql = (query) => _gql(query);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment