If I try to create my custom Adapter as suggested in the docs , I cannot access Utils methods. For example this Adapter:
import Utils from 'gql-query-builder/build/Utils';
export default class MyQueryAdapter implements IQueryAdapter {
...
this.variables = Utils.resolveVariables(options); ..
}
will throw an error like TypeError: Utils.resolveVariables is not a function
This happens because Utils is exported as an instantiable class with static functions, and while this works when importing it inside the gql-query-builder project itself, I cannot work in other projects that have a dependency to it.
If I try to create my custom Adapter as suggested in the docs , I cannot access Utils methods. For example this Adapter:
will throw an error like
TypeError: Utils.resolveVariables is not a function
This happens because Utils is exported as an instantiable class with static functions, and while this works when importing it inside the
gql-query-builder
project itself, I cannot work in other projects that have a dependency to it.See also :