Skip to content

Commit

Permalink
Add .mli for graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Feb 26, 2024
1 parent 7bf07fe commit eee2841
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/contributions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ let fetch ~period:(start, finish) ~token =
"from", `String start;
"to", `String finish;
] in
Graphql.exec token ~variables query
Graphql.exec ~token ~variables ~query ()
end

module Datetime = struct
Expand Down
2 changes: 1 addition & 1 deletion lib/graphql.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let graphql_endpoint = Uri.of_string "https://api.github.com/graphql"

let ( / ) a b = Yojson.Safe.Util.member b a

let exec ?variables token query =
let exec ?variables ~token ~query () =
let body =
`Assoc (
("query", `String query) ::
Expand Down
1 change: 1 addition & 0 deletions lib/graphql.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
val exec : ?variables:(string * Yojson.Safe.t) list -> token:string -> query:string -> unit -> Yojson.Safe.t Lwt.t

0 comments on commit eee2841

Please sign in to comment.