graphql-fetch icon indicating copy to clipboard operation
graphql-fetch copied to clipboard

Remove mandatory variable Definitions and allow access token in header

Open salujaharkirat opened this issue 6 years ago • 0 comments

For queries which don't require variables the code was breaking as _context.variableDefinitions would be null and upon reading variableDefinitions would throw error.

Adding following checks:-

  1. Reading variableDefinitions only if _context.variableDefinitions is present.
  2. If variables is set then assigning to final query else assigning null

Auth token changes:-

  1. allowing option to pass auth token in the api calls.

salujaharkirat avatar Jun 14 '18 19:06 salujaharkirat