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: move generate WhereInput logic to single hook #275

Merged
merged 7 commits into from
Apr 5, 2022

Conversation

giautm
Copy link
Collaborator

@giautm giautm commented Mar 27, 2022

No description provided.

@giautm giautm force-pushed the entgql-refactor-where-filters branch 2 times, most recently from 3a8ac9a to 6c724c8 Compare April 2, 2022 23:37
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.

Thanks for the contribution @giautm. I added minor comments.

@giautm giautm marked this pull request as ready for review April 4, 2022 17:28
Comment on lines +42 to +44
entgql.WithSchemaHook(func(g *gen.Graph, s *ast.Schema) error {
return nil
}),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hello @crossworth, what do you think about this hook? Is it satisfied with this comment? #267 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hello @giautm great work!
I have made a few small (and fast) tests and it worked without problems, I think this adds a lot of possibilities.

Maybe in the future we can collect the most common usages for schema hooks and add "helper functions".
Like adding/removing a field/directive, this should make even easier to the consumers.

I can't wait to use all this new features that you guys are adding.

@giautm
Copy link
Collaborator Author

giautm commented Apr 4, 2022

@crossworth
Copy link
Contributor

About the lint error, looks like it's about a panic:
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

I had to add the code below to .golangci.yml to make it work with GO 1.18.

run:
  go: '1.18'

@a8m
Copy link
Member

a8m commented Apr 5, 2022

About the lint error, looks like it's about a panic: panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

I had to add the code below to .golangci.yml to make it work with GO 1.18.

run:
  go: '1.18'

Thanks, @crossworth, please feel free to contribute and fix this. I failed back to go 1.17 for now to unblock our PRs.

@giautm giautm force-pushed the entgql-refactor-where-filters branch from a27a450 to 76e262f Compare April 5, 2022 06:30
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.

💯

@a8m a8m merged commit ed5ccf5 into master Apr 5, 2022
@a8m a8m deleted the entgql-refactor-where-filters branch April 5, 2022 08:26
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.

3 participants