-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow class instances to be passed onto Gatsby #9117
Comments
Some context for this - this check
|
Hi @pieh , just to get an idea: Is this issue somewhere higher in the priority list (if any)? We're currently thinking of doing other plugin development and if the class instance support is on the horizon of say weeks then we'd wait for you to implement it. It would be better than writing code that we'd probably throw away after the class instance support comes. Thanks! |
Right now I can't invest any time into doing any development on this, but I'd like to encourage You (or anyone else) to try to implement support for that and open PR (even if it's work-in-progress). |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Out of pure curiosity do you want to use classes for the purpose of using state? @JanLenoch |
Hi @arobida , I'm not sure what you mean by saying "for the purpose of using state". Anyways, we'd like to use classes as our HCMS already has a robust JavaScript SDK that provides content as class instances. Simply put, our source plugin does not talk directly to our Delivery/Preview API endpoints. It uses the SDK to do that and consumes the data as class instances. |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m Thanks again for being part of the Gatsby community! |
Summary
Currently, only plain JavaScript objects can be passed onto Gatsby's
createNode
API method. When a class instance is passed, Gatsby build will fail with an "Unknown field … on type …" GraphQL error (#8053).Motivation
Our headless CMS has a solid JS SDK that works with class instances by default. We'd like to utilize it to its full potential in Gatsby. We can't ATM.
The text was updated successfully, but these errors were encountered: