Skip to content
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

[Platform.sh] Inline document support for GraphQL #388

Open
wants to merge 12 commits into
base: 2.5
Choose a base branch
from
Open

[Platform.sh] Inline document support for GraphQL #388

wants to merge 12 commits into from

Conversation

janit
Copy link
Member

@janit janit commented Apr 11, 2019

eZ Platform v2.5 supports GraphQL by default. To enable support also on eZ Platform Cloud / Platform.sh the following changes are needed:

  • Add mount: app/config/graphql
  • Add automatic execution of schema generation: php bin/console ezplatform:graphql:generate-schema

Note that this will NOT enable the commonly used GraphiQL client in prodenv mode. In fact, because of the --no-dev flag used for composer, the GraphiQL package will not work even in devenv.

.platform.app.yaml Outdated Show resolved Hide resolved
Instead of defaults, they are now options if you want/need to deploy Schema updates.
@andrerom
Copy link
Contributor

@bdunogier Maybe you can take over on this? @janit is on mission, and me and @vidarl is on easter holliday.

@andrerom
Copy link
Contributor

andrerom commented Apr 17, 2019

Thanks @bdunogier , from what I can gather then we should not adapt platform.sh config like this, but rather start to check in the schema file on ezplatform-demo and ezplatform-ee-demo, and make sure it is updated whenever there are content type changes in demo data (?)

/cc @damianz5 & @SylvainGuittard

@bdunogier
Copy link
Member

As for demo, @andrerom, if we consider it as a standard project (e.g. not the headless case where you never touch the config / templates), then yes, it is what we should do.

@andrerom andrerom changed the base branch from master to 2.5 September 30, 2019 11:19
@andrerom andrerom changed the title Enable support for GraphQL on eZ Platform Cloud / Platform.sh Inline document support for GraphQL on eZ Platform Cloud / Platform.sh Sep 30, 2019
@andrerom andrerom changed the title Inline document support for GraphQL on eZ Platform Cloud / Platform.sh [Platform.sh] Inline document support for GraphQL Sep 30, 2019
@bdunogier
Copy link
Member

we should not adapt platform.sh config like this, but rather start to check in the schema file on ezplatform-demo and ezplatform-ee-demo, and make sure it is updated whenever there are content type changes in demo data (?)

This would be a good option for the time being. There is a drawback though: it implies that we version the schema files, meaning that they would show up as modified when the script is executed. Alternatively, we could make that step part of the installer, and copy the schema files to the schema directory on install. As a bonus, we would be sure that the schema matches the install type, since it would come with it.

A short-term alternative is to make the schema files writable in var. It requires a few changes to the extension code, but it would work, I think.

The long-term solution is to make the GraphQL schema fully dynamic (e.g. updated whenever content types / config is modified). (Much) more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants