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

Bug: {$type}Id not working #813

Closed
benallfree opened this issue Apr 20, 2019 · 0 comments
Closed

Bug: {$type}Id not working #813

benallfree opened this issue Apr 20, 2019 · 0 comments
Assignees

Comments

@benallfree
Copy link
Contributor

benallfree commented Apr 20, 2019

Seems there has been a regression in Type/Object/PostObject.php:140. The default resolver from graphql-php's Executor::defaultFieldResolver will search for $source->{$fieldName}, which of course does not exist.

This fixes it:

			'resolve'     => function ( Post $post, $args, $context, $info ) {
				return absint( $post->ID );
			},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants