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

dev: Prime the FormsLoader when querying form connections #368

Merged
merged 1 commit into from Jun 2, 2023

Conversation

justlevine
Copy link
Member

What

This PR primes the FormsLoader when using the FormsConnectionResolver.

Why

Since GF only allows you to query for the entire form, theres no difference between Connection Resolver query and the actual model population. By priming the dataloader cache, we can prevent the unnecessary extra database queries.

How

Testing Instructions

Additional Info

Checklist:

  • This PR is tested to the best of my abilities.
  • This PR follows the WordPress Coding Standards.
  • This PR has proper inline documentation.
  • This PR has unit tests to verify the code works as intended.
  • The changes in this PR have been noted in CHANGELOG.md

@codeclimate
Copy link

codeclimate bot commented Jun 2, 2023

Code Climate has analyzed commit 298ecf6 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 84.4% (0.0% change).

View more on Code Climate.

@justlevine justlevine merged commit a7b5d98 into AxeWP:develop Jun 2, 2023
18 checks passed
@justlevine justlevine deleted the dev/prime-form-dataloader branch June 2, 2023 12:58
@justlevine justlevine mentioned this pull request Jun 7, 2023
5 tasks
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.

None yet

1 participant