Skip to content

peaonunes/apollo-multiple-clients-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apollo-multiple-clients-example

Runnable example showing that is possible to override client via props.

Project connects to two different clients running on localhost 3001 and 3002.

Installing

cd graphql-mock-cities && yarn install && cd ../graphql-mock-stores && yarn install & cd .. & yarn install

Runnning

// First mock
cd graphql-mock-cities && yarn start

// Second mock
cd graphql-mock-stores && yarn start

// Project
yarn start

You can use yarn or npm if you prefer.

Access: http://localhots:3000 to see the result!

alt text

/graphql-mock-cities

Graphql Mock project running on localhost:3002/graphql. Return list of cities.

/graphql-mock-stores

Graphql Mock project running on localhost:3001/graphql. Return list of stores.

About

Runnable example showing that is possible to override client via props. https://medium.com/open-graphql/apollo-multiple-clients-with-react-b34b571210a5

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •