-
Notifications
You must be signed in to change notification settings - Fork 22
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
What is the proposed use of the cockpit "layout" features? #3
Comments
Hi @loremipson , I haven't tried the layout field myself. So naturally, it's not actually supported by the plugin. I'll have a look a this soon, stay tuned (any PR in that regard is also welcome) ☺ |
Part of Layout appears to come through already. I haven't tried all the components, but the text based ones work already, returning "'id', 'class', and 'text'. Images return the same but these values don't make sense for the, and I would image any custom components would have similar issues |
I am not sure if you know this article already, It's the best explanation of the Layout field I could find. https://medium.com/@pierreberchtold/gatsby-cockpit-layout-field-e908f4dbd87b |
Would be great to get that layout parser in this plugin, as it seems |
It seems to be a pattern with gatsby plugins for cockpit that they get abondoned after a short time Back to the layout field ... as @POGRaphy said, parts of the layout fields are coming through already but the way they are currently added to the graphql schema is a dead end; it wouldn't be possible to write GraphQL queries that match every possible combination that can be in the inferred schema. |
As promised - experimental support for the layout field type can be found in #14. It would be awesome if one of you can spend some time and test it. |
Support for Layout and Layout-grid added in version 1.0.14+. Closing this issue. |
Reopened this issue in order to add support for images and assets nested in Layout and Layout-grid field. |
Preface: I'm brand spanking new to cockpit, and have only been playing around with it for a few hours. My use-case on the front end is Gatsby V2.
When looking at the graphql queries for
layout
field types, this gets a bit tricky. Because we don't really know what the data structure will be, since the content pieces are all dynamically entered and could be different for each collection entry.Curious if there's currently a way to handle this that I don't see in the readme. I imagine something with inline fragments in graphql?
The text was updated successfully, but these errors were encountered: