Comments (5)
I accidentally created the issue before I described the problem, fixed now. Sorry about that.
from graphql-kit.
I haven't had this issue before. Bug I could reproduce it (The example repo was very handy!) and I fixed it.
This GraphQL Swift api is a bit confusing.
By using the Order
type in the query this type is registered automatically (implicitly).
The type OrderItem
is not implicitly registered.
You can explicitly register the type OrderItem
by adding this line to the bottom of your schema: Types(OrderItem.self)
(Example: https://github.com/GraphQLSwift/Graphiti/blob/af903a243862c6427935677b91f67df0c21f2a71/Tests/GraphitiTests/StarWarsAPI/StarWarsAPI.swift#L101).
I hope this can help you.
from graphql-kit.
from graphql-kit.
Sure enough, that completely fixes it. Although I can't say that I understand fully why. It seems like there's a very explicit registration of the OrderItem
type in the schema, when I define it as a GraphQL type using Type(OrderItem.self) { ...
on this line. But I'm probably still missing a something.
Really appreciate the help, as always.
from graphql-kit.
I agree, this doesn't seem perfect from an API perspective. But I also don't know enough about the Graphiti implementation so I can't explain the reason for this.
Maybe there will be a better way in the future.
from graphql-kit.
Related Issues (17)
- Get pivots HOT 2
- subscription support HOT 6
- Overriding response status code HOT 3
- Error on graphql rout HOT 1
- Date error HOT 4
- Cursor pagination HOT 1
- Selection Set from the Resolver HOT 1
- Any plan to support to async await resolvers ? HOT 5
- Registered GraphQL Schema ignores authenticators HOT 3
- Any plan to upgrade to the latest Graphiti version ? HOT 1
- Enum in GraphQL schema HOT 2
- Can't add parent and child fields to schema due to circular dependency HOT 8
- [Help] How to enrich a response using GraphQL, Vapor and Graphiti
- support for @Sibling many-to-many relationships? HOT 4
- how to use @Timestamp model properties in graphql types HOT 2
- querying @OptionalParent relation HOT 4
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-kit.