Comments (4)
Yeah, we have a prettify step to get rid of those redundant fragments. But looks like it doesn't work as expected in 0.5.0. In theory, it shouldn't break anything but I'll check it.
Thanks for reporting! 👍
from gatsby-graphql-toolkit.
In my case the issue is that I have a query complexity limit from api and those fragments push the query over it
from gatsby-graphql-toolkit.
I think the problem is with nested ids. The prettify step basically removes duplicates of ID fragment. But in your case after we add remoteTypeName: __typename
to sys
field it becomes different from the ID fragment:
fragment AccordionListItemId on AccordionListItem {
remoteTypeName: __typename
sys {
id
}
}
I think in v0.5.0 this is what've changed:
fragment PageContentAccordionList__itemsCollection__0__items__0 on AccordionListItem {
remoteTypeName: __typename
sys {
+ remoteTypeName: __typename
id
}
}
Now, this fragment is not a subset of the ID fragment anymore hence not removed. Just out of curiosity - what happens if you add this to the ID fragment (not suggesting as a fix, just want to confirm my hypothesis):
fragment AccordionListItemId on AccordionListItem {
__typename
sys {
+ __typename
id
}
}
from gatsby-graphql-toolkit.
Should be fixed in 0.6.0
from gatsby-graphql-toolkit.
Related Issues (20)
- feat: display error on 4xx/5xx http error codes HOT 4
- Stale data invalidation with delta syncing
- Add ability to map custom scalar types HOT 2
- Feat: a way to avoid certain references HOT 4
- Duplicate nodes overwrite unique nodes, resulting in missing Gatsby GraphQL nodes. HOT 1
- Invalid object Node Ids create an unclear error message HOT 1
- Sourcing non-list data HOT 1
- Nullable lists are transformed into non-nullable lists HOT 8
- gatsby 4 - cannot call `createTypes` in the `sourceNodes` API HOT 1
- Toolkit throws TypeError if query returns a non-iterable object
- GraphQL 16 compatibility HOT 2
- Cannot query field HOT 1
- success fetching Nodes, but no Gatsby nodes created. HOT 1
- Accept a function as `gatsbyTypePrefix` .
- Complains about null for non-null type HOT 1
- Fails to execute LIST_ query with NoPagination
- wagtail grapple support
- Import interfaces from source schema
- Cannot query field on type "Query" HOT 1
- LIST does not fetch all data HOT 5
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 gatsby-graphql-toolkit.