Skip to content

Commit

Permalink
fix: Pass the entry to the QuizResults resolver (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Sep 17, 2023
1 parent 5576d2e commit 2b5a054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased
- fix: Check if entries exist before resolving the connection `count`.
- fix: Improve type checks when calculating the `QuizResults` data.
- fix: Pass the entry array to the `QuizResults` resolver.
- chore: Fix Composer PHP version constraints and rebuild lockfile. Thanks @szepeviktor!
- chore: Update WPGraphQL Coding Standards to 2.0.0-beta.1 and fix resulting issues.
- chore: Update Composer dev-deps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function register_field(): void {
'type' => static::$type,
'description' => __( 'The quiz results for the entry. Requires Gravity Forms Quiz to be enabled.', 'wp-graphql-gravity-forms' ),
'resolve' => static function ( $source ) {
return $source;
return ! empty( $source->entry ) ? $source->entry : null;
},
]
);
Expand Down

0 comments on commit 2b5a054

Please sign in to comment.