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

entgql: fixed edge filter #344

Merged
merged 3 commits into from
Jun 27, 2022
Merged

entgql: fixed edge filter #344

merged 3 commits into from
Jun 27, 2022

Conversation

giautm
Copy link
Collaborator

@giautm giautm commented Jun 27, 2022

Thanks @amrnt for reporting and provide the test cases, ❤️

@giautm giautm force-pushed the giautm/fixed-edge-filter branch from 354ff32 to 67875f3 Compare June 27, 2022 13:59
Co-authored-by: Amr Tamimi <amrnt0@gmail.com>
@giautm giautm force-pushed the giautm/fixed-edge-filter branch from 67875f3 to c271c76 Compare June 27, 2022 14:07
@giautm giautm marked this pull request as ready for review June 27, 2022 14:07
@giautm giautm requested a review from a8m June 27, 2022 14:07
Co-authored-by: Amr Tamimi <amrnt0@gmail.com>
@giautm giautm force-pushed the giautm/fixed-edge-filter branch from c271c76 to a97f9a0 Compare June 27, 2022 14:15
Copy link
Contributor

@amrnt amrnt left a comment

Choose a reason for hiding this comment

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

Looking good 💯 🥇

@@ -640,6 +640,118 @@ func (s *todoTestSuite) TestPaginationFiltering() {
})
}

func (s *todoTestSuite) TestEdgesFiltering() {
Copy link
Member

Choose a reason for hiding this comment

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

I think we can move this test case to the NestedPagination/NestedConnection one.

Also, in this test case, you don't really test the Query<E> method, because the edges are resolved/loaded by the fields-collector (using eager-loading).

@amrnt, how do you use this API? Do you call these methods directly?

Copy link
Member

Choose a reason for hiding this comment

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

OK, I see now. It's called childrenLevel1 and that's why it's not loaded.

I still want to give it a look before merging it.

Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

Looks good, but we need to address preload for aliases as well.

@a8m a8m merged commit ab52bdf into master Jun 27, 2022
@a8m a8m deleted the giautm/fixed-edge-filter branch June 27, 2022 15:55
@frederikhors
Copy link

Is there any docs for edge filtering?

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.

4 participants