Skip to content

peaonunes/apollo-multiple-clients-example

Folders and files

NameName
Last commit message
Last commit date
Dec 20, 2022
Dec 20, 2022
Aug 7, 2018
Aug 7, 2018
Aug 7, 2018
Aug 7, 2018
Aug 7, 2018
Feb 7, 2023

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.