Comments (5)
Let me explain why you have this issue. First in Swagger, enums are not named types and they are not working like key/value pairs as in TypeScript and GraphQL so we cannot generate a key for empty value then you get that invalid typings.
You have multiple enum types with similar/same values because enums are not named types in Swagger so even if they are similar it is not possible to know if they are same enum or not so each enum
definition is considered as a different enum type.
As a solution, we will prefix numeric keys with _
and add EMPTY
instead of empty key. I will submit a PR and let you know when alpha version is ready to test.
Thanks for reporting this issue!
from graphql-mesh.
Could you try with the following alpha version?
0.1.5-alpha-6131ae4.0
from graphql-mesh.
@ardatan thanks mate, version 0.1.5-alpha-6131ae4.0
solves the issue.
Concerning the unnamed enums, is it an option to check for object equality in favour of clean typings so that objects with the same key/value pairs are considered to be the same type?
from graphql-mesh.
@stefan-- We don't have that kind of option yet but I added it as todo :) #264
from graphql-mesh.
Available in 0.1.5!
from graphql-mesh.
Related Issues (20)
- Could Not Find Module for relative imports when mocking HOT 1
- JSON-Schema issues with required + nullable=true fields HOT 1
- HTTP cache broken if response includes multiple headers of the same name HOT 1
- mesh build --throwOnInvalidConfig does not throw on invalid config
- RPC Method Named 'Close' Conflicts with Client Connection Close Operation in GraphQL Mesh gRPC Handling
- Response types from OAS response schema $ref
- Feedback for “Extend Transform (experimental)”
- Feedback for “Operation Field Permissions”
- HTTP cache returns unusable response if TTL = 0 => server hangs indefinitely
- Easily access underlying API responses HOT 2
- TypeScript strict null checks
- graphql-mesh with gRPC and openapi handlers + global transform results in cached variables HOT 1
- `@omnigraph/openapi`: OpenAPI array values not converted correctly into GraphQL
- mysql HOT 1
- Using enum in swaggers break other routes HOT 5
- prometheus config not working HOT 4
- Supergraph handler fails with same field name HOT 2
- SDK return types are misleading
- transform-hive does not support SelfHosting
- Format check in CI HOT 3
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-mesh.