Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

fix(graphql-types): graphql-tag binding for default export #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/graphql-types/ReasonApolloMutation.re
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ open ReasonApolloTypes;

module MutationFactory = (Config:Config) => {
external cast : string => {. "data": Js.Json.t, "loading": bool} = "%identity";
[@bs.module] external gql : ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql : ReasonApolloTypes.gql = "default";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They seem to have updated the docs showing the difference: https://bucklescript.github.io/docs/en/import-export.html#import-an-es6-default-value

[@bs.module "react-apollo"] external mutationComponent: ReasonReact.reactClass = "Mutation";

let graphqlMutationAST = [@bs] gql(Config.query);
Expand Down
2 changes: 1 addition & 1 deletion src/graphql-types/ReasonApolloQuery.re
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
open ReasonApolloTypes;

module Get = (Config:ReasonApolloTypes.Config) => {
[@bs.module] external gql : ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql : ReasonApolloTypes.gql = "default";
[@bs.module "react-apollo"] external queryComponent : ReasonReact.reactClass = "Query";

type response =
Expand Down