You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The graphql:Context object currently has 3 input parameters; attributes, engine, and nextInterceptor. Except for the attributes parameter, others does not make sense.
The attributes parameter: This can be used to initialize the context object with a set of attributes. This too is redundant as the set method can be used to set attributes. However, it can be useful in some scenarios.
The engine parameter: This is not useful as the users cannot create a graphql:Engine object. So there's no point in passing this in the init method. Instead, it should be set internally, without exposing it to the public.
The nextInterceptor parameter: This is not useful as well since the value should be 0 every time we create a context object. It should be incremented internally when an interceptor is executed.
Given the above reasons, I would suggest to remove the engine and nextInterceptor parameters from the init method of the graphql:Context object.
This will not break any existing code since the parameters are not used and we have not advised to use them anyway.
The text was updated successfully, but these errors were encountered:
Description:
The
graphql:Context
object currently has 3 input parameters;attributes
,engine
, andnextInterceptor
. Except for theattributes
parameter, others does not make sense.attributes
parameter: This can be used to initialize the context object with a set of attributes. This too is redundant as theset
method can be used to set attributes. However, it can be useful in some scenarios.engine
parameter: This is not useful as the users cannot create agraphql:Engine
object. So there's no point in passing this in theinit
method. Instead, it should be set internally, without exposing it to the public.nextInterceptor
parameter: This is not useful as well since the value should be0
every time we create a context object. It should be incremented internally when an interceptor is executed.Given the above reasons, I would suggest to remove the
engine
andnextInterceptor
parameters from theinit
method of thegraphql:Context
object.This will not break any existing code since the parameters are not used and we have not advised to use them anyway.
The text was updated successfully, but these errors were encountered: