Skip to content

[5.x] Ensure nav blueprint graphql types are registered #11881

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

Merged
merged 2 commits into from
Jun 19, 2025

Conversation

ryanmitchell
Copy link
Contributor

When using GraphQL to query a nav which has a replicator in the blueprint, you get an error showing the type has not been defined.

This PR ensures the types get registered and the error goes away.

I tried doing this using the types() method on the interface but it didn't seem to get called.

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

I believe you can add a static addTypes method like on PageInterface and call it from TypeRegistrar.

public static function addTypes()

PageInterface::addTypes();

@ryanmitchell
Copy link
Contributor Author

Thanks @jasonvarga that was the missing piece in the puzzle

@jasonvarga jasonvarga merged commit d4398ba into statamic:5.x Jun 19, 2025
24 checks passed
@ryanmitchell ryanmitchell deleted the fix/nav-blueprint-types branch June 19, 2025 15:47
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