Comments (9)
@d-exclaimation Haha, that's exactly what I did! Great minds think alike!
@cshadek Could you try this #97 and validate that it fixes your Connection
issue as well?
from graphiti.
@NeedleInAJayStack I just tried a bunch of orders for Connections, Unions, Types, and Interfaces and they all worked. Nice work!
from graphiti.
I'll take a look at this. I am assuming the problem is about using those types in a query, mutation, or subscription field(s) require them to be declared in a PartialSchema that's ordered before where the fields are
from graphiti.
@d-exclaimation Interesting. It also is an issue if an interface is after a type that implements it.
Got it. I was able to reproduce the issue. I noticed this is also might be a problem with just regular Schema, where intefaces need be declared before any types that uses it.
@NeedleInAJayStack can you verify this? does an interface need to be declared before being used?
from graphiti.
Yeah, I am able to recreate too. Ideally no ordering should be required - I'll look at fixing this tonight. Thanks for reporting @cshadek
from graphiti.
As a side note, I'm really excited to refactor my existing 1500+ line schema and start using PartialSchemas! I've already noticed a lot of improvement with the code completion in the smaller schemas while trying them out.
from graphiti.
After further analysis, it seems to be an issue exclusive to Interfaces, Unions, and ConnectionTypes. These all need to be declared before they are used in a type or query. While not ideal, this is not the end of the world.
from graphiti.
@d-exclaimation Interesting. It also is an issue if an interface is after a type that implements it.
from graphiti.
Yeah, I am able to recreate too. Ideally no ordering should be required - I'll look at fixing this tonight. Thanks for reporting @cshadek
Not sure exactly how to properly fix this, but one idea I had is to sort the component declared by like a priority, for example:
Scalars > Enums > Inputs > Interface > Type (Object) > Union > Query > Mutation > Subscription
I guess this would have not immediately solve the case where something like a Union is referenced by a Type (Object), Interfaces, or other Unions. However, so far this method seems to work
from graphiti.
Related Issues (20)
- PartialSchema with coders HOT 1
- Federation N+1 query problem HOT 2
- Schema Introspection Failure HOT 2
- How to access the selectionSet from the Resolver ? HOT 3
- Renaming ConnectionTypes isn't working HOT 6
- Feature: Create better support for custom connections HOT 2
- PartialSchema error with argument in type field HOT 5
- Federation reference resolver with filtering
- Potential Bug with Input types HOT 2
- 'Identifiable' is only available in iOS 13.0 or newer HOT 2
- GraphQLError extension to add error code
- Duplicate type registration
- Latest version fails to compile HOT 2
- Example of using subscriptions with Vapor HOT 2
- Swift Compiler unable to type check long Schema expression HOT 2
- Improvements to SchemaBuilder and allowing sub schemas HOT 13
- Some types don't resolve anymore after updating to 1.2.1 HOT 8
- PartialSchema Type extensions HOT 9
- How do you include a ConnectionType in a PartialSchema? HOT 2
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 graphiti.