Comments (5)
Here is GitHub repo: https://github.com/jakubmazanec/graphql-codegen-import-types-preset
npm install
npm run codegen
File output/operations.ts
, lines 55-65 should show the issue.
Is this ok for reproduction? Thanks for finding time to look at this.
from graphql-code-generator-community.
Hi @jakubmazanec and thank you for the report!
Sorry but I'm not adding a lot here but just labeling it according to our new Contribution Guide and issue flow.
It seems like we are on stage 0
.
Now in order to advance to stage 1
we'll need an easily running reproduction, do you think you can create that on code sandbox?
Thank you and sorry that this comment is not a complete solution (yet).
from graphql-code-generator-community.
I think initially this was intended to be typescript
+ typescript-operations
in one file, and then typescript-react-apollo
in another file with that preset, this way all types are prefixed. So this might be a use-case that isn't fully supported yet... PRs are always welcome!
from graphql-code-generator-community.
In my use, typescript-operations
is generated based on the consumer query definitions, so it makes more sense for it to be colocated with typescript-react-apollo
. Whereas typescript
is generated solely from the GQL Schema. A solution to this issue would be helpful for me
from graphql-code-generator-community.
This problem still exists
from graphql-code-generator-community.
Related Issues (20)
- Dotnet code gen does not work on the website HOT 1
- defaultBaseOptions value is not exported in generated file
- Allow toggling useSuspenseQuery generation HOT 2
- [java] generated enum arguments lack validation HOT 2
- [react-apollo] Add support for `useLoadableQuery`
- skipToken support for typescript-react-apollo HOT 3
- [Java] Reserved keyword "case" used in generated code
- Ability to use the core API in `typescript-react-apollo`
- Implement a graphql-codegen plugin that outputs a client SDK written in Effect
- Data should be null when an error occurs
- Cannot import typescript operation definition file with 'near-operation-plugin' and document: external
- I get Cannot redeclare block-scoped variable with client preset
- Doc fix for an extra apostrophe in the code example for additionalDI (apollo-angular config.)
- [RTK-Query] Hook generator does not match InjectedAPI typings when typings are not in pascalCase HOT 1
- useFragment does not support variables or other base options
- Flutter json_serializable use `JsonValue` as the json key of Enum
- GraphQL to FLutter Drift
- Codegen generates unused types from the schema
- Error on "typescript-react-apollo" plugin + vite: [vite] Named export 'gql' not found. The requested module '@apollo/client' is a CommonJS module, which may not support all module.exports as named exports
- Tooling modernization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-code-generator-community.