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
{{ message }}
This repository was archived by the owner on Jun 10, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 10, 2019. It is now read-only.
Use the new GitHub GraphQL API for exporting user contributions #486
This is the GraphQL Schema that would integrate with Apollo, which integrates with Redux. I've seen a Redis implementation as well as a kinex, express-graphql, connect, koa, mongoose with a MongoDB memory store and isomorphic fetch. The tooling around this new concept for a REST like implementation is pretty amazing. The ability to visualize data is as easy as installing an extension.
Needs more research
There are ways to connect GraphQL with Rails as well as any other frontend library / framework, and I'm not completely sure which would be the best implementation. This may not even be necessary, but I'd like to know if we're going to move forward with this as I work on fetching data from GitHub. Their newest version of their API uses GraphQL, and I've seen what it's capable of doing. I'll see if I can demo what I have and record it for more clarity on this subject.
Here is a simple way to connect with both HTTP and Websockets:
import{SubscriptionClient,addGraphQLSubscriptions}from'subscriptions-transport-ws';importApolloClient,{createNetworkInterface}from'apollo-client';// Create WebSocket clientconstwsClientOptions={reconnect: true,connectionParams: {// Pass any arguments you want for initialization}};constwsNetworkInterface=newSubscriptionClient('ws://localhost:3000/graphql',wsClientOptions);// Create regular NetworkInterface by using apollo-client's API:consthttpNetworkInterface=createNetworkInterface({uri: '/graphql'// Your GraphQL endpoint});// Create Hybrid interfaceconsthybridInterface=addGraphQLSubbscriptions(httpNetworkInterface,wsNetworkInterface)// Finally, create your ApolloClient instance with the modified network interface// Full websocket: wsNetworkInterface// Mixed Mode: hybridInterfaceconstapolloClient=newApolloClient({networkInterface: hybridInterface});
Activity
sethbergman commentedon Sep 8, 2017
I've added some information to this issue / question. Here's a good resource:
https://github.com/apollographql/apollo-client/blob/master/README.md
kylemh commentedon Oct 1, 2017
How does this issue differ from #481 ?
sethbergman commentedon Nov 25, 2017
Closing this