Description
I'm not sure where else to ask for help, but I believe I've narrowed it down to the graphql server or this repo.
I started my project based off the https://learnrelay.org tutorial, and changed the URL to use my own graphql server with authentication. (The git repo is https://github.com/learnrelay/pokedex/tree/master/branch-step-02-solution) I'd simply like to swap off the current graphql endpoint and implement my own.
This is how my project is currently setup:
package.json
"graphql": {
"request": {
"url": "http://myGraphQLEndpoint/graphql/query",
"headers": {
"Content-Type": "application/json",
"apiToken": "fasdfasefasef"
}
}
},
index.js
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('http://myGraphQLEndpoint/graphql/query', {
headers: {
"Content-Type": "application/json",
apiToken: 'fasdfasefasef'
}
})
);
I get the following error:
Module build failed: TypeError: Cannot read property 'errors' of null
at exports.default (c:\dev\pokedex\node_modules\babel-plugin-react-relay\lib\index.js:30:13)
at Function.memoisePluginContainer (c:\dev\pokedex\node_modules\babel-core\lib\transformation\fi
le\options\option-manager.js:109:13)
at Function.normalisePlugin (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\opti
ons\option-manager.js:142:32)
at c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:
30
at Array.map (native)
at Function.normalisePlugins (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\opt
ions\option-manager.js:154:20)
at OptionManager.mergeOptions (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\op
tions\option-manager.js:229:36)
at OptionManager.init (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\options\op
tion-manager.js:374:12)
at File.initOptions (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\index.js:216
:65)
at new File (c:\dev\pokedex\node_modules\babel-core\lib\transformation\file\index.js:139:24)
at Pipeline.transform (c:\dev\pokedex\node_modules\babel-core\lib\transformation\pipeline.js:46:
16)
at transpile (c:\dev\pokedex\node_modules\babel-loader\index.js:14:22)
at Object.module.exports (c:\dev\pokedex\node_modules\babel-loader\index.js:88:12)
@ multi main
Would anybody know why this error might be occuring? As a note, this doesn't error out when connecting to the learnrelay.org graphql endpoint. I don't believe there is an issue with my graphql endpoint, as I am able to send queries to it with POSTMAN with authentication headers successfully.
Any tips would be greatly appreciated!
Activity