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

Clarity fixes #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

roelofjan-elsinga
Copy link

@roelofjan-elsinga roelofjan-elsinga commented Jun 8, 2022

  • Renamed "Plugin" to "Extension", because they're two different things in GQLgen
  • Fixed the interface, the Extension shouldn't have methods with a pointer receiver according to the interface definition
  • Rename the struct fields for Extension/Plugin -> The intention is now clearer. Does FilterField == true return the field or remove it? It's now ReturnField, which is easier to read.
  • Updated the example code to give extra context
  • Added type definition as third parameter to the FieldFilter, because you might want to return a field based on the parent type

- Fixed interface implementation of the extension (no pointers)
- Renamed Plugin to Extension, because they're 2 different things
- Added type definition as third input to the field filter
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