All Projects → imranhsayed → graphql-workshop

imranhsayed / graphql-workshop

Licence: other
⚒ 🚧 A GraphQL workshop to learn GraphQL implementations

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to graphql-workshop

boilerplate
Boilerplate for @prisma-cms
Stars: ✭ 22 (+10%)
Mutual labels:  apollo, apollo-client, headless-cms
kontent-boilerplate-express-apollo
Kontent Boilerplate for development of Express application using Apollo server and GraphQL.
Stars: ✭ 21 (+5%)
Mutual labels:  apollo, apollo-client, headless-cms
ctrip-apollo
The most delightful and handy Node.js client for ctrip apollo configuration service.
Stars: ✭ 56 (+180%)
Mutual labels:  apollo, apollo-client
GitHunt-Polymer
An example of a client-side app built with Polymer and Apollo Client.
Stars: ✭ 13 (-35%)
Mutual labels:  apollo, apollo-client
matters-web
Website of Matters.News, built with Next.js.
Stars: ✭ 70 (+250%)
Mutual labels:  apollo, apollo-client
gitstar
Github Client built with React Apollo
Stars: ✭ 15 (-25%)
Mutual labels:  apollo, apollo-client
Apollo Cache Redux
Redux cache for Apollo Client 2.0. This project is no longer maintained.
Stars: ✭ 179 (+795%)
Mutual labels:  apollo, apollo-client
bookshelf
My GraphQL playground
Stars: ✭ 64 (+220%)
Mutual labels:  apollo, apollo-client
apollo-fragment
Use Apollo Link State to connect components to GraphQL fragments in the Apollo Cache
Stars: ✭ 112 (+460%)
Mutual labels:  apollo, apollo-client
apollo-cache-instorage
Apollo Cache implementation that facilitates locally storing resources
Stars: ✭ 98 (+390%)
Mutual labels:  apollo, apollo-client
RxApolloClient
RxSwift extensions for Apollo Client
Stars: ✭ 46 (+130%)
Mutual labels:  apollo, apollo-client
Agollo
An elegant Go client for Ctrip Apollo
Stars: ✭ 167 (+735%)
Mutual labels:  apollo, apollo-client
Ddp Apollo
DDP link for Apollo with GraphQL Subscriptions support
Stars: ✭ 163 (+715%)
Mutual labels:  apollo, apollo-client
Kit
ReactQL starter kit (use the CLI)
Stars: ✭ 232 (+1060%)
Mutual labels:  apollo, apollo-client
Next Graphql Blog
🖊 A Blog including a server and a client. Server is built with Node, Express & a customized GraphQL-yoga server. Client is built with React, Next js & Apollo client.
Stars: ✭ 152 (+660%)
Mutual labels:  apollo, apollo-client
Reactql
Universal React+GraphQL starter kit: React 16, Apollo 2, MobX, Emotion, Webpack 4, GraphQL Code Generator, React Router 4, PostCSS, SSR
Stars: ✭ 1,833 (+9065%)
Mutual labels:  apollo, apollo-client
agollo
🚀Go client for ctrip/apollo (https://github.com/apolloconfig/apollo)
Stars: ✭ 563 (+2715%)
Mutual labels:  apollo, apollo-client
Graphql Directive
Use custom directives in your GraphQL schema and queries 🎩
Stars: ✭ 142 (+610%)
Mutual labels:  apollo, apollo-client
Apollo Php Client
携程Apollo配置中心PHP客户端
Stars: ✭ 147 (+635%)
Mutual labels:  apollo, apollo-client
nap
[Deprecated] NextJS + Apollo + PassportJS
Stars: ✭ 52 (+160%)
Mutual labels:  apollo, apollo-client

GraphQL React Application

Description 📋

A GraphQL workshop to learn GraphQL implementations in JavaScript

GraphQL App DEMO 📹

Built With

  1. GraphQL
  2. React
  3. Apollo Client
  4. External dependency wp-graphql ( for graphql-with-wordpress branch )
  5. Express
  6. Node js
  7. create-react-app ( uses Babel and Webpack )

Details 📜

  1. ➡️ We have set up our backend server in node and express app ( localhost:5000/graphql ) in server.js.
  2. ➡️ React application is set up using create-react-app ( that runs webpack-dev-server for the frontend on localhost:3000 )
  3. ➡️ The schema and graphQl queries are created in schema.js
  4. ➡️ We have used wp-graphql WordPress plugin that brings the power of GraphQL to WordPress.
  5. ➡️ GraphiQL playground is available on localhost:5000/graphql.
  6. ➡️ We have used Apollo Client to build UI in React that fetches data from GraphQL. Apollo client help us create a query and binds our React component with the query, so that when component renders, and handles any queries to GraphQl server and return the results.
  7. ➡️ We import <Apolloclient> from apollo-boost and create a new object called client and pass the url for our GraphQL endpoint into this object.
  8. ➡️ We wrap our main React Component <AppoloProvider> and apollo client is then passed to these components, so that the results of your query can be passed to your components.
  9. ➡️ The 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.
  10. ➡️ Use gpl to query the data in front react app, from the schema we have create in our node application in backend.
  11. ➡️ We have displayed all the data received as response of the query on home page( Home.js ).

GraphiQL Playground DEMO 📹

Installation 🔧

  1. Clone this repo by running git clone https://github.com/imranhsayed/graphql-workshop
  2. npm install
  3. npm run dev

Branches Information:

    • master Creates a GraphQL server using express and nodejs and adds an endpoint at localhost:5000/graphql, where you can send all your query request.
    • It has Apollo client with React on front end .
  1. graphql-with-wordpress uses GraphQL server created by wp-graphql plugin on your WordPress install and React in frontend. More info is in that branch's read me.

Plugins for GraphQL with WordPress 🔌

For graphql-with-wordpress branch Clone these repositories into plugin directory of your WordPress Install and activate them from WordPress dashboard.

  1. wp-graphql
  2. wp-graphiql

Instructions 👉

  • Graphiql is a tool that we can use as a client to make request to our server.
  • Graph QL endpoint where you can send your query request: localhost:5000/graphql

Common Commands 💻

You can run these commands from root directory.

  1. npm run dev runs webpack-dev-server for frontend on port 3000 in watch mode and backend server on port 5000. ( Uses concurrently package to run the two servers together, so the below two command are not required to run if you run this ).
  2. npm run dev:client starts webpack dev server for React on port 5000
  3. npm run dev:server starts nodejs server on port 3000
  4. npm run prod:client runs the build for production for client.

Useful Links 🔗

  1. Express GraphQL github link
  2. Apollo GraphQL

Apollo Client is way to use GraphQL to build client applications. It helps you build a UI that fetches data with GraphQL, and can be used with any JavaScript front-end. When two components need the same data. If an action triggers an update on update, the second one won’t be updated . Apollo solves this using reactive cache feature. Its main job is fetch some GraphQL queries and keep them in sync with one another

Thank you Note 🙏

I would like to thank 🙏 everyone who attended the GraphQL with React and WordPress Meet up on Sep 21, 2019. The session wouldn't have been so enjoyable and fruitful without your presence.😊

📹MeetUp Highlights

📷Twitter Post with Snaps

License

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].