Created
December 3, 2017 20:06
-
-
Save drejohnson/df3598966f056a2abd0a35c450effabd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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