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

Fix Craft 5.6+ compatibility #161

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

brandonkelly
Copy link
Contributor

EntryArguments::getArguments() no longer includes custom fields in Craft 5.6.0+ (craftcms/cms#16326).

Rather that update registerGqlQueries() to be consistent with how Craft defines entry queries, this PR simplifies the function to just figure out which queries are already defined by $event->queries, and only overwrite their resolver properties.

Fixes #160

LucaDelBuono

This comment was marked as duplicate.

Copy link

@LucaDelBuono LucaDelBuono left a comment

Choose a reason for hiding this comment

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

I'm getting this error on any query now:

"exception": "yii\\base\\ErrorException",
"message": "Undefined variable $name",
"file": "...................\RestrictionService.php",
"line": 114,

@brandonkelly
Copy link
Contributor Author

Apologies, that’s fixed now.

@LucaDelBuono
Copy link

Works again, thank you so much for your hard work @brandonkelly !!!

@LucaDelBuono
Copy link

Can we get this merged in @jaydensmith please?

@jamesedmonston jamesedmonston merged commit 678fed4 into jamesedmonston:develop Feb 4, 2025
@jamesedmonston
Copy link
Owner

@brandonkelly thanks so much

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.

GraphQL queries failing or returning wrong values after update to Craft 5.6.1
3 participants