Skip to content

[PP-7275] Add Content Store-like API endpoint for GraphQL #3474

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

brucebolt
Copy link
Member

No description provided.

This will have the same API inputs and outputs as Content Store, but
will be powered by GraphQL.

Doing this will allow us to make a 'drop-in' replacement for Content
Store, as no changes will need to be made to frontend applications
(other the the URL for the API).
This has been copied verbatim and will need some updating to match our
query style.
It was migrated in from `govuk-graphql` which uses different query
syntax to our implementation, so updating the code to output queries
that work here.
@brucebolt brucebolt force-pushed the graphql-content-store branch from 4ce99a6 to bb1f58d Compare July 23, 2025 09:37
schema_name = Edition.live.where(base_path:).pick(:schema_name)

# TODO: handle unsupported schema_name
if schema_name && (class_name = "queries/graphql/#{schema_name}_query".camelize.constantize)

Check warning

Code scanning / Brakeman

Unsafe reflection method constantize called on model attribute. Warning

Unsafe reflection method constantize called on model attribute.
This was generated using `GraphqlQueryBuilder` and then additional
fields added manually.
This was generated using `GraphqlQueryBuilder` and then additional
fields added manually.
@brucebolt brucebolt force-pushed the graphql-content-store branch from bb1f58d to 157454c Compare July 23, 2025 10:01
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.

1 participant