create-react-app
, mkdir components and styles (../styles/index.css)
src/index.js
/prisma
and /src
When a query is received by the server, it will resolve it and retrieve the required data from the connected database.
apollo-client
where all the magic happens.apollo-cache-memory
recommended cache apollo-link-http
an apollo link for remote data fetching apollo-link-error
an apollo link for error handling apollo-link-state
an apollo link for local state management graphql-tag
exports the gql function for your queries & mutations react-apollo
contains the bindings to use Apollo Client with ReactGET
requestPOST
requestPrisma
provides the database layer which offers CRUD operations. The second layer is the application layer for business logic and common workflows (like authentication).Apollo Client
<Query />
component and passing GraphQL query as prop<Mutation />
component allow variables, optimisticResponse, refetchQueries, and update as props