Open tsukhu opened 6 years ago
I can confirm that breaks import * from file
after upgrade from 0.52
to 0.6.0
# import Query.*, Mutation.*, * from "./starwars.graphql"
works for me after upgrading from 0.4.5
to 0.6.0
🤔 import * from file
works fine to me with 0.6.
@tsukhu & @czystyl: could you prepare a minimal example?
@alvis Given that different people are having different results, this may be some specific scenario which is not working. I will try to do to create a separate sample. But if you want to look at it immediately you can check
https://github.com/ERS-HCL/nxplorerjs-microservice-starter. Once you upgrade to graphql-imports to 0.6.0 and the imports stop working there after. I had upgraded it to 0.6.0 from 0.5.2 but the build broke, hence I reverted it back.
OK .. I have debugged the issue and was able to fix the build (using 0.6.0) with the following changes
With v0.6.0 the standard schema types of Query , Mutation and Subscription MUST be provided with the root field types of Query. , Mutation. and Subscription.* otherwise we get a runtime error of 'EOF'
The earlier version was allowing using the wild cards only for these types as well. I guess this is also fine , but we need to have a note in the README to mention that for people upgrading from earlier versions
https://github.com/ERS-HCL/nxplorerjs-microservice-starter/pull/124 With this change the travis build issue is now resolved for me. https://travis-ci.org/ERS-HCL/nxplorerjs-microservice-starter/builds/393489075
So it is related to #176, which was merged since 0.5.3.
To be fair, the change is mentioned as tiny words in https://github.com/prismagraphql/graphql-import/releases#0.5.3, but @tsukhu is right that it's a breaking change and it should be properly documented.
ping @timsuchanek & @schickling
I upgraded the nxplorerJS project to v0.6.0 and got the following error
Here is the travis build reference https://travis-ci.org/ERS-HCL/nxplorerjs-microservice-starter/jobs/382177481
This appears to be related to https://github.com/prismagraphql/graphql-import/issues/45 but when I added a dummy type the wildcard imports do not get imported properly
Code snippet
main.graphql