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

Update GraphQL approach for world index #3908

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

yndajas
Copy link
Member

@yndajas yndajas commented Dec 13, 2024

Trello

Given we're still in the learning stage with the GraphQL project, we've decided to minimise the changes needed on frontend apps by retaining the current heavily nested data structure. This updates Collections to work with that format (the changes to Publishing API are also in progress). This means that the code for the world index page in collections will be less divergent between paths for GraphQL and REST data sources. This commit undoes some of the divergence we initially introduced

We plan to revisit simplifying the data structure later (into a less nested form)

Publishing API PR


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

Given we're still in the learning stage with the GraphQL project, we've
decided to minimise the changes needed on frontend apps by retaining the
current heavily nested data structure. This updates Collections to work
with that format (the changes to Publishing API are also in progress).
This means that the code for the world index page in collections will be
less divergent between paths for GraphQL and REST data sources. This
commit undoes some of the divergence we initially introduced

We plan to revisit simplifying the data structure later (into a less
nested form)
@yndajas yndajas force-pushed the update-world-index-shape branch from 648c052 to dd98c9f Compare December 13, 2024 19:39
@govuk-ci govuk-ci temporarily deployed to collections-pr-3908 December 13, 2024 19:39 Inactive
Comment on lines +12 to +13
.dig("data", "edition")
.deep_transform_keys(&:underscore)
Copy link
Member

Choose a reason for hiding this comment

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

I'm hoping to remove the need for this in a future version of gds-api-adapters.

@yndajas yndajas merged commit fb54b33 into main Dec 16, 2024
14 checks passed
@yndajas yndajas deleted the update-world-index-shape branch December 16, 2024 10:03
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.

3 participants