-
Notifications
You must be signed in to change notification settings - Fork 61
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
SiteTree types #239
Comments
Hi, @ivoba . Great questions, and I'll be honest -- this is an area we're still trying to get right. There's been a lot of discussion about how to deal with inheritance. Related: #215 Right now, exposing any dataobject to graphql results in the entire inheritance chain being exposed. For instance, exposing The reason being:
foreach (Page::get() as $page) {
$page->RedirectType; // Bad practice, but we have to support this, as the ORM allows it.
} Does that help at all? |
@unclecheese I see, thats actually quite cool. So you get the whole CMS types for free with simply exposing I played around with this a bit and have some remarks:
I will test this a bit more and might get back :) |
I'll close this for now as there's nothing to action. If you need more help maybe try one of those community support options: |
This is more a question than an issue:
In the docs in the inheritance section: https://github.com/silverstripe/silverstripe-graphql#dealing-with-inheritance the generated schema contains a SiteTree type altough its not declared in the yaml/php section above.
Are the standard CMS types included in silverstripe-graphql or was the declaration of SiteTree just omitted?
Maybe it would be good to have a standard declaration for the CMS basic types like SiteTree, Page?
The text was updated successfully, but these errors were encountered: