Skip to main content
Version: 4.x

Custom mutations

Below, you'll find the result of running various GraphQL queries against the examples repo schema. This is intended to be an introduction and quick reference, for full information please use the documentation links.

Please be aware that these examples use the @graphile-contrib/pg-simplify-inflector plugin to simplify the field names over the defaults.

Forgot password

mutation {
forgotPassword(input: { email: "[email protected]" }) {
success
}
}

Generated with SQL like this:

create function forgot_password(email text)
returns boolean
language plpgsql volatile
as $$
...
$$;
-- Optionally rename the result field:
comment on function
forgot_password(email text)
is '@resultFieldName success';

Result:

{
"forgotPassword": {
"success": true
}
}