From 33b571458657ec216527187e0b24739b0a2a01b4 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 11:07:25 +0300 Subject: [PATCH 01/11] Enabling support for GraphQL on eZ Platform Cloud / Platform.sh --- .platform.app.yaml | 5 +++++ app/config/graphql/.gitkeep | 0 2 files changed, 5 insertions(+) create mode 100644 app/config/graphql/.gitkeep diff --git a/.platform.app.yaml b/.platform.app.yaml index 8b9920f977..5e387e740a 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -73,6 +73,10 @@ mounts: 'web/var': source: local source_path: var + # GraphQL Schemas should be generated dynamically on deploy + 'app/config/graphql': + source: local + source_path: graphql # To be prepared to move to cluster, please rather use e.g. persisted Redis instance. 'web/sessions': source: local @@ -121,6 +125,7 @@ hooks: # Example of additional deploy hooks if you use doctrine and/or kaliop migration bundle ##bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration ##bin/console kaliop:migration:migrate --no-interaction --no-debug + php bin/console ezplatform:graphql:generate-schema # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously #post_deploy: | diff --git a/app/config/graphql/.gitkeep b/app/config/graphql/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From 0aabf2298337ecac9311df99b1bd80d059b057c4 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 11:10:19 +0300 Subject: [PATCH 02/11] adding conf dir to gitignoer --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b5e4427096..b728e1fcb4 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ /.web-server-pid /app/config/parameters.yml +/app/config/graphql/* /build/ /phpunit.xml /var/* From d91a8764c8307da75c2e75e9ded4f963d5e3cf38 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 11:14:32 +0300 Subject: [PATCH 03/11] Updating gitkeep --- app/config/graphql/.gitkeep | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/config/graphql/.gitkeep b/app/config/graphql/.gitkeep index e69de29bb2..7f3f7cd092 100644 --- a/app/config/graphql/.gitkeep +++ b/app/config/graphql/.gitkeep @@ -0,0 +1,8 @@ +This directory is intentionally left empty. It to be populated by automatically generated GraphQL schema configuration files. Schema generation is done with the following commands: + +``` +php bin/console ezplatform:graphql:generate-schema +php bin/console cache:clear +``` + +For more information on eZ Platform and GraphQL see: https://doc.ezplatform.com/en/latest/api/graphql/#toc From e5879c34a0b587096272cb98c1d5a529c4302e9f Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 11:15:08 +0300 Subject: [PATCH 04/11] Adding readme file to conf --- app/config/graphql/{.gitkeep => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/config/graphql/{.gitkeep => README.md} (100%) diff --git a/app/config/graphql/.gitkeep b/app/config/graphql/README.md similarity index 100% rename from app/config/graphql/.gitkeep rename to app/config/graphql/README.md From 6926f468b7011f484b209c3d94675aaf5a3c7f44 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 11:23:49 +0300 Subject: [PATCH 05/11] Update README.md --- app/config/graphql/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/graphql/README.md b/app/config/graphql/README.md index 7f3f7cd092..8e6e3eb2c5 100644 --- a/app/config/graphql/README.md +++ b/app/config/graphql/README.md @@ -1,4 +1,4 @@ -This directory is intentionally left empty. It to be populated by automatically generated GraphQL schema configuration files. Schema generation is done with the following commands: +This directory is intentionally left empty. It is to be populated by automatically generated GraphQL schema configuration files. Schema generation is done with the following commands: ``` php bin/console ezplatform:graphql:generate-schema From ccdaa304590a6da3fab1aa43fea9d1af46dc74be Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 12:32:13 +0300 Subject: [PATCH 06/11] Commented GraphQL configurations Instead of defaults, they are now options if you want/need to deploy Schema updates. --- .platform.app.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 5e387e740a..7cc8faf4d4 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -73,10 +73,10 @@ mounts: 'web/var': source: local source_path: var - # GraphQL Schemas should be generated dynamically on deploy - 'app/config/graphql': - source: local - source_path: graphql + # GraphQL Schemas need be generated dynamically on server to reflect status + #'app/config/graphql': + # source: local + # source_path: graphql # To be prepared to move to cluster, please rather use e.g. persisted Redis instance. 'web/sessions': source: local @@ -125,7 +125,9 @@ hooks: # Example of additional deploy hooks if you use doctrine and/or kaliop migration bundle ##bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration ##bin/console kaliop:migration:migrate --no-interaction --no-debug - php bin/console ezplatform:graphql:generate-schema + + ## Deploy hook to automatically generate GraphQL schema on deploy (could also be executed manually when needed) + # php bin/console ezplatform:graphql:generate-schema # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously #post_deploy: | From a0f868166f131fc25485f81749c21161bf645261 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 12:32:52 +0300 Subject: [PATCH 07/11] Fixed wording --- .platform.app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 7cc8faf4d4..45447d0ca3 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -73,7 +73,7 @@ mounts: 'web/var': source: local source_path: var - # GraphQL Schemas need be generated dynamically on server to reflect status + # GraphQL Schemas need be generated dynamically on server to reflect live repository status #'app/config/graphql': # source: local # source_path: graphql From af585614dbf0b362d3b47e125e2d63e02ba9b524 Mon Sep 17 00:00:00 2001 From: Jani Tarvainen Date: Thu, 11 Apr 2019 16:08:46 +0300 Subject: [PATCH 08/11] Update .platform.app.yaml --- .platform.app.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 45447d0ca3..be2c605535 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -126,8 +126,9 @@ hooks: ##bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration ##bin/console kaliop:migration:migrate --no-interaction --no-debug - ## Deploy hook to automatically generate GraphQL schema on deploy (could also be executed manually when needed) - # php bin/console ezplatform:graphql:generate-schema + # Deploy hook to automatically generate GraphQL schema on deploy. + # Could also be executed manually when needed - on clustered instances on each node + ##php bin/console ezplatform:graphql:generate-schema # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously #post_deploy: | From ce3dc80d16a2ea27a11d286674fa66ad11f8bc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Mon, 30 Sep 2019 13:26:10 +0200 Subject: [PATCH 09/11] Update .platform.app.yaml --- .platform.app.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 8973f64bb6..4c2ef97881 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -84,10 +84,10 @@ mounts: 'web/var': source: local source_path: var - # GraphQL Schemas need be generated dynamically on server to reflect live repository status - #'app/config/graphql': - # source: local - # source_path: graphql +# Uncomment if GraphQL Schemas need be generated dynamically on server to reflect live repository status: +# 'app/config/graphql': +# source: local +# source_path: graphql # To be prepared to move to cluster, please rather use e.g. persisted Redis instance. 'web/sessions': source: local From 27c5dd04c3aabf6220ba2688d0e53a69dcf281b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Mon, 30 Sep 2019 13:27:57 +0200 Subject: [PATCH 10/11] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 09f506c5e0..9de30e529d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,8 @@ /.web-server-pid /app/config/parameters.yml -/app/config/graphql/* +# Ucomment if you'd like to not depoy schema changes with your code +#/app/config/graphql/* /build/ /phpunit.xml /var/* From 06221eb513ab514a38ad24c417ab5e227cd455ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Mon, 30 Sep 2019 13:28:12 +0200 Subject: [PATCH 11/11] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9de30e529d..a4fcbff216 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ /.web-server-pid /app/config/parameters.yml -# Ucomment if you'd like to not depoy schema changes with your code +# Uncomment if you'd like to not depoy schema changes with your code #/app/config/graphql/* /build/ /phpunit.xml