Follow this skill when adding a Portal Admin GraphQL mutation.
Workflow
- Read
./portal/src/graphql/adminapi/schema.graphqlfirst. - Create the
.graphqlfile under./portal/src/graphql/adminapi/mutations. - Query all fields on the top-level entity unless the user explicitly says otherwise.
- Avoid nested entities unless the user asked for them.
- Run
cd ./portal && npm run gentypeafter adding the file.
Notes
- Keep the operation name consistent with existing Portal GraphQL naming.
- Do not invent schema fields; use only what exists in the schema file.
Source: authgear/authgear-server — distributed by TomeVault.