Actual
Currently the extensions component defined in:
|
// Extension is an interface for extensions in graphql |
|
type Extension interface { |
Contains methods that are named in a way that could be clearer, for example:
|
// ParseDidStart is being called before starting the parse |
|
ParseDidStart(context.Context) (context.Context, ParseFinishFunc) |
^ It is not clear if the hook executes before or after the Parse process started.
Expected
We want to update the Extensions interface methods to a clearer naming using precise prefix, eg:
ParseDidStart -> BeforeParseHook
Using the same re-naming strategy: Before/After<Component Name>Hook we want to update the other methods.
For backwards compatibility let's keep the existing methods as a fallback.
Notes
Actual
Currently the extensions component defined in:
graphql/extensions.go
Lines 32 to 33 in 58689e0
Contains methods that are named in a way that could be clearer, for example:
graphql/extensions.go
Lines 40 to 41 in 58689e0
^ It is not clear if the hook executes before or after the
Parseprocess started.Expected
We want to update the
Extensionsinterface methods to a clearer naming using precise prefix, eg:ParseDidStart->BeforeParseHookUsing the same re-naming strategy:
Before/After<Component Name>Hookwe want to update the other methods.For backwards compatibility let's keep the existing methods as a fallback.
Notes