createNetworkInterface is not a function
See original GitHub issueThe docs say that you can create a new Network Interface by using
import ApolloClient, { createNetworkInterface } from 'apollo-client';
const networkInterface = createNetworkInterface('http://localhost:8080/graphql');
const client = new ApolloClient({
networkInterface
});
but for me it throws
Uncaught TypeError: (0 , _apolloClient.createNetworkInterface) is not a function
Is there anything that I’m missing?
(I’m using apollo-client with Electron and a normal Graphql Server.)
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (3 by maintainers)
Top Results From Across the Web
error: createNetworkInterface is not a function on React Native ...
I have really tried my best to look for solutions on how to implement this, but most tutorials/documentations are for react for web...
Read more >error: createNetworkInterface is not a function on React Native ...
Coding example for the question error: createNetworkInterface is not a function on React Native and Apollo Client-React Native.
Read more >How can I resolve the AWS Glue error "The specified subnet ...
My AWS Glue extract, transform, and load (ETL) job returns one of the following errors: "The specified subnet does not have enough free ......
Read more >The provided execution Role does not have Permissions
Open the AWS Lambda console and click on the function's name; Click on the Configuration Tab and then click Permissions. click on role....
Read more >IAM Permissions For Functions - Serverless Framework
does not define role. func1: # will assume 'myDefaultRole' ... # does not define role ... ec2:CreateNetworkInterface. - ec2:DescribeNetworkInterfaces.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just opened a project and updated
react-apollo
and it detonated everything, which is also highlighting that https://github.com/apollographql/react-apollo is currently some troll documentation.I was using these like this in React Native:
It definitely doesn’t work in React Web with
react-apollo 2.0
.I checked my RN app and even though I installed it last week~, its using
react-apollo 1.4
.I will downgrade back to sub 2.0, and post my results since someone else will surely see this as well.
Thanks to the magic of time travel, here are my results:
There is no 1.5, 1.6, 1.7, 1.8, or 1.9, so that will downgrade you to the newest non-2.0 version, and you can use:
You don’t need to install
apollo-client
.Just kidding,
apollo-client
is included withreact-apollo
. You should see it in node_modules if you burn everything to the ground and just installreact-apollo
1.4~.Here is some bonus code, just in case anyone wants to confirm what works well:
./src/index.js
I imagine you will want to avoid anything to do with this code if you are looking to get to
react-apollo 2.0
.I checked it out and the setup looked haywire breaking change, so I won’t be switching to it ASAP unless someone posts a migration path and usage of
graphql()
andwithApollo()
are virtually identical.same 🔢