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

Api / Graphql : Allow version as singleton argument on singleton #22184

Merged
merged 4 commits into from
Apr 12, 2024

Conversation

joselcvarela
Copy link
Member

Scope

On #21386 we have included support to fetch relational data when requestong a version of an item.

Although, this support were included only for existing resolvers, but we didn't have support to request a version of a singleton in Graphql.
The support for it is only included on <collection>_by_id(id: ID!, version: String), but singletons so not have this resolver.

Since a singleton is retrieved using <collection> resolver, in this PR we just add version argument to this resolver.
In the end, the resolver for singleton will be <collection>(version: String)

What's changed:

  • Add support to request a version for a singleton on Graphql

Potential Risks / Drawbacks

  • Since these are only additions, I don't foresee any issue

Review Notes / Questions

  • N/A

Copy link

changeset-bot bot commented Apr 12, 2024

🦋 Changeset detected

Latest commit: ca57069

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@paescuj paescuj self-assigned this Apr 12, 2024
Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

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

LGTM!

@paescuj paescuj enabled auto-merge (squash) April 12, 2024 10:46
@paescuj paescuj merged commit 75c03bd into directus:main Apr 12, 2024
5 checks passed
@github-actions github-actions bot added this to the Next Release milestone Apr 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants