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

Commit

Permalink
Merge pull request #194 from JakubMarkiewicz/fix/jsx3-gqltag-import
Browse files Browse the repository at this point in the history
Change graphql-tag import to default jsx3-hooks
  • Loading branch information
Gregoirevda authored May 30, 2019
2 parents 0f4306e + 2e1ed51 commit aee51fb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions examples/realtime-chat-application/src/MessagesContainer.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

module Styles = {
open Css;
Expand Down Expand Up @@ -62,7 +62,6 @@ let make = _children => {
function(prev, next) {
if(!next.subscriptionData.data || !next.subscriptionData.data.messageAdded)
return prev;
return Object.assign({}, prev, {
messages: prev.messages.concat(next.subscriptionData.data.messageAdded)
});
Expand All @@ -80,4 +79,4 @@ let make = _children => {
}
</GetAllMessagesQuery>
</div>
};
};
2 changes: 1 addition & 1 deletion examples/swapi/src/PersonSubscribeToMore.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

let ste = React.string;

Expand Down
4 changes: 2 additions & 2 deletions src/ApolloClient.re
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ type uploadLinkOptions = {
[@bs.module "apollo-client"] [@bs.new]
external createApolloClientJS: 'a => generatedApolloClient = "ApolloClient";

[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

[@bs.obj]
external apolloClientObjectParam:
(
Expand All @@ -62,7 +64,6 @@ external apolloClientObjectParam:
"";

module ReadQuery = (Config: ReasonApolloTypes.Config) => {
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
type readQueryOptions = {
.
"query": ReasonApolloTypes.queryString,
Expand Down Expand Up @@ -91,7 +92,6 @@ module ReadQuery = (Config: ReasonApolloTypes.Config) => {
};

module WriteQuery = (Config: ReasonApolloTypes.Config) => {
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
type writeQueryOptions = {
.
"query": ReasonApolloTypes.queryString,
Expand Down
2 changes: 1 addition & 1 deletion src/graphql-types/ReasonApolloMutation.re
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Make = (Config: Config) => {
} =
"%identity";

[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

let graphqlMutationAST = gql(. Config.query);
type response = mutationResponse(Config.t);
Expand Down
2 changes: 1 addition & 1 deletion src/graphql-types/ReasonApolloQuery.re
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type renderPropObjJS = {
};

module Make = (Config: ReasonApolloTypes.Config) => {
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

type response = queryResponse(Config.t);

Expand Down
2 changes: 1 addition & 1 deletion src/graphql-types/ReasonApolloSubscription.re
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
open ReasonApolloTypes;

module Make = (Config: ReasonApolloTypes.Config) => {
[@bs.module] external gql: ReasonApolloTypes.gql = "graphql-tag";
[@bs.module "graphql-tag"] external gql: ReasonApolloTypes.gql = "default";

let graphQLSubscriptionAST = gql(. Config.query);

Expand Down

0 comments on commit aee51fb

Please sign in to comment.