Skip to content

Docs: Interface/union type not displayed properly #322

@schickling

Description

@schickling

Interfaces and unions are currently displayed as a normal type definition. That's a bug.

Example

This is the actual schema definition of the following schema:

# Represents an owner of a Repository.
interface RepositoryOwner {
  # A URL pointing to the owner's public avatar.
  avatarUrl(
    # The size of the resulting square image.
    size: Int
  ): URI!
  id: ID!

  # The username used to login.
  login: String!

  # A list of repositories this user has pinned to their profile
  pinnedRepositories(
    # Returns the first _n_ elements from the list.
    first: Int

    # Returns the elements in the list that come after the specified global ID.
    after: String

    # Returns the last _n_ elements from the list.
    last: Int

    # Returns the elements in the list that come before the specified global ID.
    before: String

    # If non-null, filters repositories according to privacy
    privacy: RepositoryPrivacy

    # Ordering options for repositories returned from the connection
    orderBy: RepositoryOrder

    # Affiliation options for repositories returned from the connection
    affiliations: [RepositoryAffiliation]

    # If non-null, filters repositories according to whether they have been locked
    isLocked: Boolean
  ): RepositoryConnection!

  # A list of repositories that the user owns.
  repositories(
    # Returns the first _n_ elements from the list.
    first: Int

    # Returns the elements in the list that come after the specified global ID.
    after: String

    # Returns the last _n_ elements from the list.
    last: Int

    # Returns the elements in the list that come before the specified global ID.
    before: String

    # If non-null, filters repositories according to privacy
    privacy: RepositoryPrivacy

    # Ordering options for repositories returned from the connection
    orderBy: RepositoryOrder

    # Affiliation options for repositories returned from the connection
    affiliations: [RepositoryAffiliation]

    # If non-null, filters repositories according to whether they have been locked
    isLocked: Boolean

    # If non-null, filters repositories according to whether they are forks of another repository
    isFork: Boolean
  ): RepositoryConnection!

  # Find Repository.
  repository(
    # Name of Repository to find.
    name: String!
  ): Repository

  # The HTTP URL for the owner.
  resourcePath: URI!

  # The HTTP URL for the owner.
  url: URI!
}

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions