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

DDFBRA-96 extend GraphQL schema with go config #1685

Merged
merged 12 commits into from
Oct 31, 2024

Conversation

Dresse
Copy link
Contributor

@Dresse Dresse commented Oct 25, 2024

Link to issue

https://reload.atlassian.net/browse/DDFBRA-96

Description

This PR adds 2 new custom modules:

  • dpl_graphql -Used for handling all custom GraphQL and GraphQL Compose functionality such as creating new SchemaTypes and extensions. For now, the module only contains a new SchemaType called DplConfiguration, which is gonna be used for DPL-CMS configuration which should be used in DPL-GO. The SchemaType is very limited, as it is expected to extend it in other custom modules, the same way we do in dpl_unilogin module.
  • dpl_unilogin - Used for handling UniLogin configuration in DPL-CMS. This includes a new configuration form for entering Unilogin API endpoints, client ID and client secret. The module also extends on the DplConfiguration, by adding a new SchemaType called UniloginConfiguration.

core.extensions config as well as through the dpl_update install hooks.
the 'admin/config/services'.

Added 4 fields to the configuration:
- UniLogin API endpoint.
- UniLogin API wellknown endpoint.
- UniLogin client ID.
- UniLogin client secret.
…sions.

Added a new GraphQLCompose SchemaType called DplConfiguration which is gonna
be used for serving all relevant dpl-cms configuration to dpl-go.

The SchemaType is pretty stripped down, but is gonna be extended through our
other custom modules.
We now extend on the DplConfiguration SchemaType from dpl_graphql.
@Dresse Dresse force-pushed the DDFBRA-96-extend-graphql-schema-with-go-config branch 2 times, most recently from a5db505 to ebc36ac Compare October 30, 2024 20:36
@Dresse Dresse force-pushed the DDFBRA-96-extend-graphql-schema-with-go-config branch from ebc36ac to 56f7d60 Compare October 30, 2024 20:41
… unusable

field, we decided to move all of the logic inside the dpl_graphql module again.

This PR removes the GraphQL and GraphQLCompose plugins in dpl_unilogin module,
and instead moves it into the dpl_graphql module.

I also removed a README.md file explaining how to extend the DplConfiguration
SchemaType.

I have saved my work in another branch locally, so if we need to go back and
re-visit the decision, the work is not totally lost.
@Dresse Dresse force-pushed the DDFBRA-96-extend-graphql-schema-with-go-config branch from 13aa5bc to f06827f Compare October 31, 2024 10:51
@spaceo spaceo self-requested a review October 31, 2024 11:44
@spaceo spaceo removed their assignment Oct 31, 2024
…r this is

that we can't be sure that the values has been set correctly, when they are set
to null, the frontend can handle the logic.

Changed the unilogin resolver to check if unilogin values has been set. If not
we now return NULL.

Instead we now set the default values of the non-sensitive endpoints in settings.php
but only for non-production environments.

Also added dpl_unilogin.settings to config ignore, as we do not want to override these
variables.
Copy link
Collaborator

@spaceo spaceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition.
If it works in the PR env then lets get it in...

…s" post-rollout tasks.

Assigned the new user the graphql_consumer role.
@Dresse Dresse merged commit 4ac2ab4 into develop Oct 31, 2024
19 checks passed
@Dresse Dresse deleted the DDFBRA-96-extend-graphql-schema-with-go-config branch October 31, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants