Comments (5)
Thanks for the workaround @Simply007. I can confirm that precomputing the data I'm filtering on as outlined in the schema-definition-changes repo is a good workaround for the properties that can't be filtered using KontentItem interface.
This doesn't affect the query performance described in #107, but as stated in that issue, the Gatsby team is aware and thinks it may be a regression on their end.
from gatsby-packages.
Hi @bwlng thank you for letting us know. I'm not sure about usedByContentItems
(@Simply007 should know better), however, in my opinion missing other languages property is a bug. We will let you know!
from gatsby-packages.
Hello @bwlng,
thanks for submitting this. This is caused by the filter is using KontentItem interface that does not have most of the elements defined, because they are defined in inherited types.
Unfortunately, I haven't found any GraphQL possibilities to type this filter using inline fragment, nor the gatsby documentation according to the input filter and their potential inferring is not up to date.
On the other hand, I have tried a more clean way how to precompute some data to fields
in OnCreateNode lifecycle method.
The solution is in the https://github.com/Simply007/schema-definition-changes repository
You might want to use any other lifecycle method (https://www.gatsbyjs.org/docs/node-apis/#gatsby-node-apis) by the specific use case. Or even setFieldsOnGraphQLNodeType if it suits you.
In my opinion, this might be also beneficial according to the performance of running queries described in #107, but it is just a guess, the performance peaks must be identified first - but worth a try!
from gatsby-packages.
According to the vision - we would like to extract the functionality of the "computed" properties from the source plugin and describe how to implement them right in the application or provide the transformers plugin if the property would be heavily used.
See #108
from gatsby-packages.
Great to hear @bwlng!
I am closing the issue for now.
If we missed anything on this issue or if you want to keep it open, feel free to do so.
from gatsby-packages.
Related Issues (20)
- Gatsby Kontent Components - resolveLink in RichTextElement not getting called HOT 6
- ResolveDomNode for resolving links does not work correctly HOT 2
- Kontent workflow transition generates a preview build. HOT 11
- Image Flickers when conditionally rendering an image using React Context state HOT 13
- Type Error when using TypeScript HOT 7
- Publish webhook body versus Unpublish webhook body. HOT 11
- Allow Gatsby Source Kontent Plugin to filter by collection HOT 18
- Showcase Gatsby SSR and DSG HOT 5
- Unable to use Deferred Static Generation with the Gatsby Source Kontent Plugin HOT 4
- Extend RichText resolver by component flag HOT 23
- Content backups are out of date
- Use new Netlify Gatsby plugin for examples and development site
- Replace Lerna with alternative HOT 2
- Export getGatsbyImageData
- [Spike] Make kontent assets as individual nodes
- Support React 18 in gatsby-components
- Support for content sync from gatsby
- Some observations from profiling Intralox HOT 1
- Asset renditions are not available in the Gatsby data layer HOT 14
- Build and Netlify deployments failing HOT 1
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-packages.