-
Notifications
You must be signed in to change notification settings - Fork 107
fix(graphql-types): graphql-tag binding for default export #80
base: master
Are you sure you want to change the base?
fix(graphql-types): graphql-tag binding for default export #80
Conversation
@@ -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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the exact same thing: https://bucklescript.github.io/docs/en/import-export.html
There was a problem hiding this comment.
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
Do you have
in your bsconfig.json? |
Ah yeah I have
|
Does this fixes the problem? I'd find it strange cause it should really be exactly the same. |
Yes this fixes it. If you look at What do you think? |
The creator of Bucklescript told me ES6 default import support was not merged in master yet. Let's wait a bit more |
Should we merge the fix first and refactor it once BS has support for that? Everyone who uses ES6 currently can’t use this library. I understand your point but I find this bug fix important. |
Sure, I'll do that this evening ;) |
@Gregoirevda any update on this one? |
Hello, any updates on this one ? The patch works well in my case.. would love to have this released :-) |
This is still an issue for |
@Gregoirevda yes. I’m battling this currently. The docs show different examples of importing default and ES6 (babel) default: |
Is this still an issue? I believe Buckescript now has support for default export...? |
@Gregoirevda Is |
Can someone confirm this is fixed with es6 modules? @baransu I was referring to: rescript-lang/rescript#2677 (comment) which might be outdated |
Labels:
Description
Fix bindings for the
default
export ofgraphql-tag
Instead it should be