only use HTTP POST to send data. • Request body can be a Form Data or JSON. • You still need to take care of Authentication, Authorisation and SSL/TLS on your application server.
a REST API: ◦ The endpoint ◦ The method ◦ The headers ◦ The data (or body) • CRUD operations on Resources. • Reference: https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/
REST API: ◦ The endpoint: https://example.com/graphql ◦ The method: POST ◦ The headers: <depends on your application> ◦ The data (or body): JSON / Form Data ▪ query ▪ variables ▪ operationName
using a GraphQL client to see how we can interactively make requests to a GraphQL service. • https://graphql.org/swapi-graphql • Tasks: ◦ Compose a GraphQL request query. ◦ Use the interactive documentation to find out what you can request. ◦ Experience the build in validation.
▪ Int: A signed 32‐bit integer. ▪ Float: A signed double-precision floating-point value. ▪ String: A UTF‐8 character sequence. ▪ Boolean: true or false. ▪ ID: The ID scalar type represents a unique identifier. ▪ Enum: Enumeration of constants. ◦ You can declare your own types.
are building a database for a Library. • A library has many books • Book has ISBN • Book has publish date • Book has many authors • Book has many categories
of the available queries that clients can execute, along with the return type for each. In this case, the "books" query returns an array of zero or more Books (defined above).
We will build a simple React app that shows all the movies in the Star Wars franchise. We will be using the Star Wars API. • Instructions: https://github.com/CoderKungfu/graphql-workshop • Using CodeSandbox: https://codesandbox.io
be using the Apollo GraphQL library to build our own GraphQL Server. • Apollo Server needs to know how to populate data for every field in your schema so that it can respond to requests for that data. To accomplish this, it uses resolvers. • Instructions: https://github.com/CoderKungfu/graphql-workshop • Using CodeSandbox: https://codesandbox.io