A demo app for using GraphQl, Appollo Client with React and SpaceX API
localhost:5000/graphql
) in server.js
.localhost:8080
)schema.js
https://api.spacexdata.com/v3/launches
)localhost:5000/graphql
. Check demo.<AppoloProvider>
and appolo client
is then passed to these components.graphql-tag
( graphQl query parsing utility ) is installed and gpl
is imported from it. The gpl
parses GraphQL query strings into the standard GraphQL AST.gpl
to query the data in front react app, from the schema we have create in our node application in backend.Launches.js
).Launch.js
http://localhost:8080/launch/1
, when he request for launch item with id=1 )git clone https://github.com/imranhsayed/graphql-react-app
npm install
npm run server
localhost:5000/graphql
npm run dev:webpack
runs webpack-dev-server for frontend on port 8080 in watch modenpm run server
runs node server for backend on localhost:5000/graphql
npm run dev
would run both front end and backend servers on their respective ports, using concurrentlystart
Runs the server at localhost:5000/graphql
in non watch mode