Add how to resolve user properties to docs#1292
Merged
klausi merged 2 commits intodrupal-graphql:8.x-4.xfrom Jul 13, 2022
Merged
Add how to resolve user properties to docs#1292klausi merged 2 commits intodrupal-graphql:8.x-4.xfrom
klausi merged 2 commits intodrupal-graphql:8.x-4.xfrom
Conversation
There was a full working example requested here: drupal-graphql#1288
joaogarin
approved these changes
Jul 8, 2022
klausi
approved these changes
Jul 11, 2022
Contributor
klausi
left a comment
There was a problem hiding this comment.
Looks good, just some whitespace issues that should be cleaned up!
| (For this to actually work we would need to add resolvers to the User object to resolve the `id` and `name` properties). | ||
| For this to actually work we would need to add resolvers to the User object to resolve the `id` and `name` properties like so: | ||
| ```php | ||
| $registry->addFieldResolver('User', 'id', $builder->callback(function ($account) { |
Contributor
There was a problem hiding this comment.
any reason for the indentation here? We don't have it in the field resolver examples further above.
Contributor
|
I can merge this anyway and fix the whitespace in a follow-up. |
klausi
pushed a commit
to klausi/graphql
that referenced
this pull request
Sep 21, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a full working example requested here:
#1288