DOCKER_BUILDKIT=1 docker build -t graphql-python-showcase .
docker run --rm -p 9000:9000 graphql-python-showcase
Open http://<your-docker-host>:9000/
.
query allProjects {
projects {
id
name
slug
}
}
query allProjectNames {
projects {
name
}
}
query allProjectsWithTasks {
projects {
id
name
tasks {
id
title
}
}
}
query projectBySlug($slug: String!) {
projectBySlug(slug: $slug) {
id
name
slug
}
}
Provide a required slug
variable:
{
"slug": "proj1"
}
query projectWithTasksBySlug($slug: String!, $withTasks: Boolean!) {
projectBySlug(slug: $slug) {
id
name
slug
tasks @include(if: $withTasks) {
id
title
}
}
}
{
"slug": "proj1",
"withTasks": true
}
query projectBySlug($slug: String!) {
projectBySlug(slug: $slug) {
id
name
slug
tasks {
id
title
assignee {
id
name
}
}
}
}
query projectBySlugIntrospected($slug: String!) {
projectBySlug(slug: $slug) {
__typename
id
name
slug
tasks {
__typename
id
title
assignee {
__typename
id
name
}
}
}
}
todo: use variables
mutation createProject {
createProject(name: "Project 4", slug: "prj4") {
project {
id
name
slug
}
ok
}
}
todo: use variables
mutation reassignTask {
reassignTask(taskId: 1, assigneeId: 2) {
task {
id
assignee {
id
name
}
}
ok
}
}
Add:
- Enums (task status)
- Pagination
- Fragments
- Auth
- app.pluralsight.com/library/courses/graphql-big-picture/table-of-contents
- egghead.io/courses/graphql-query-language
- egghead.io/courses/designing-graphql-schemas-99db
- packtpub.com/application-development/beginning-graphql-elearning
- packtpub.com/application-development/practical-graphql-become-graphql-ninja-video
- packtpub.com/web-development/hands-full-stack-web-development-graphql-and-react