Skip to content

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
@brucebolt brucebolt changed the title [PP-7275] Add Content Store-like API endpoint for GraphQL [PP-7275] Spike into automating the creation of GraphQL queries Jul 31, 2025
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