# Add Portal Admin API Query

> Add Portal Admin API Query is an Agent Skill for development published in the authgear/authgear-server repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Add a Portal Admin GraphQL query under portal/src/graphql/adminapi/query.

- Skill name: `add-portal-admin-api-query`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/authgear/authgear-server/blob/HEAD/.claude/skills/add-portal-admin-api-query/SKILL.md
- Repository: authgear/authgear-server (1,895 GitHub stars when collected)

## SKILL.md

Follow this skill when adding a Portal Admin GraphQL query.

## Workflow

1. Read `./portal/src/graphql/adminapi/schema.graphql` first.
2. Create the `.graphql` file under `./portal/src/graphql/adminapi/query`.
3. Include `cursor`, `pageInfo`, and `totalCount` when the query supports pagination and the user did not ask to omit them.
4. Query the fields of the entity itself, but avoid nested entities unless the user asked for them.
5. Run `cd ./portal && npm run gentype` after 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: https://www.openparable.com/skill/development/add-portal-admin-api-query (OpenParable). Cite the canonical URL above.
