
What technologies we will use in this tutorial: Django, GraphQL, Graphene, Python, PyCharm
What is GraphQL
Apply pending migrations with python manage.py migrate to enable the built-in django admin. Create a superuser with manage.py createsuperuser, then log in to manage users and data.
Learn how to model a movie and a director in Django, connect them with a foreign key and on_delete rules, define a string representation, and run migrations.
Learn to use the GraphiQL interface in Django to write queries like all movies, select fields such as title and year, and view the resulting JSON data.
Learn to add a dynamic custom field to the movie type in GraphQL with Django, using a resolve function to compute movie age as old or new based on year.
Name GraphQL queries for easier debugging and readability, use variables to make queries dynamic, and apply include and skip directives to conditionally fetch fields such as movies and directors.
Create a movie update mutation in Graphene for GraphQL, requiring an id and optional title or year, update the movie, save, and return the updated record.
Create a movie delete mutation that accepts only the id and removes the movie from the database, with GraphQL queries confirming its absence.
Extend a django graphql project with jwt authentication by installing django graphql jwt, configuring middleware and authentication classes, and enabling token-based login through obtain json web token.
Discover how Relay, a data driven framework powered by GraphQL, streamlines Django GraphQL queries by using Relay node types, edges, and built in filtering with Django filter connection field.
Explore relay mutations in Django Graphene: convert global IDs, use input objects for updates, and return payloads with mutate and get payload, illustrated by updating a movie record.
Learn how introspection schema defines query and mutation operations, generate a schema.json for front-end clients with a single manage.py graphql_schema command, and choose its output path.
Set up a React app with a GraphQL client, write a first get movies query using gql, and fetch data with the useQuery hook to display movie titles.
Learn how to integrate Apollo client with Angular, configure the GraphQL module and uri, and run the Angular server to fetch a movie list similar to the React approach.
We will learn what is GraphQL, what are pros and cons of using it. We will talk about the main concept in GraphQL like schemas, types, queries, mutations and subscriptions.
In the first section we will create plain Django project. This is introduction to Django framework and none previous knowledge is required.
Once the project will be setup we will add GraphQL. In that way you will be able to follow along with either your own Django project or simple project we have created together in the first section. I will explain how to create a root schema and how to create schemas for apps. Also we will implement new Django url to use graphiql: the UI to perform or queries and mutations. Once GraphQL is ready we will add Types, Queries and Mutations. I will show you different ways to write these and explain why we might use one option over another.
After we will have a solid understanding of the GraphQL and how it is connected with Django, we will dive deeper and add some extras like: Token Authentication (JWT), Relay implementations, Filters, Pagination etc.
We will finish the course with the samples how to use our backend GraphQL API with front end applications based on both React and Angular. We will have 2 separate application that will fetch data from our Django Database using our graphql API. We will use apollo library on the front end.