Logo
NeoArc Studio

GraphQL Operations

Document queries, mutations, and subscriptions with full support for arguments, return types, validation, examples, and complexity hints.

GraphQL operations are the core of your API documentation. The dedicated editor supports documenting queries, mutations, and subscriptions with full support for arguments, return types, examples, and metadata.

Operation Types

GraphQL defines three operation types, each serving a distinct purpose:

Operation Properties

Every operation has these configurable properties:

PropertyRequiredDescription
nameYesThe GraphQL field name (e.g., "products", "createOrder")
operationTypeYesOne of: query, mutation, subscription
descriptionNoRich text explanation of the operation's purpose
argumentsNoInput parameters with types and validation
returnTypeNameNoGraphQL type signature (e.g., "[Product!]!")
returnTypeSchemaRefNoReference to a schema definition
deprecatedNoMark operation as deprecated with reason
complexityNoNumeric complexity score for rate limiting
exampleQueryNoExample GraphQL operation in SDL format
exampleVariablesNoExample variables JSON
exampleResponseNoExample response JSON
authRequirementsNoOperation-level security override
tagsNoCategorisation tags
triggerDescriptionNoEvent trigger explanation (subscriptions only)

Return Types

Operations return typed data. Configure return types using either:

  • Direct Type Name - GraphQL type signature like "User", "[Product!]!", or "Boolean"
  • Schema Reference - Link to a schema definition for complex types

Return type modifiers:

  • Nullable - Whether the return value can be null
  • List - Whether the operation returns an array
  • List Item Nullable - Whether items within the list can be null
# Non-null user
user(id: ID!): User!

# Nullable list of non-null products
products(limit: Int): [Product!]

# Non-null list of nullable users
allUsers: [User]!

# Non-null list of non-null strings
tags: [String!]!

Operation Examples

Provide examples to help consumers understand how to use your API:

{
  "exampleQuery": "query GetUser($id: ID!) {\n  user(id: $id) {\n    id\n    name\n    email\n    createdAt\n  }\n}",
  "exampleVariables": "{\n  \"id\": \"user-123\"\n}",
  "exampleResponse": "{\n  \"data\": {\n    \"user\": {\n      \"id\": \"user-123\",\n      \"name\": \"Jane Smith\",\n      \"email\": \"[email protected]\",\n      \"createdAt\": \"2024-01-15T10:30:00Z\"\n    }\n  }\n}"
}

Editor Interface

The operation editor provides six tabs:

  1. Basics - Name, type, description, trigger description (subscriptions)
  2. Arguments - Input parameters with types, validation, and lineage
  3. Return Type - Output type configuration and schema reference
  4. Examples - Query, variables, and response examples
  5. Security - Authentication override configuration
  6. Metadata - Tags, links, complexity, deprecation

Related Content