OBJECT

Query

The query root of GitHub's GraphQL interface.

link GraphQL Schema definition

  • type Query {
  • # Fetches an object given its ID.
  • #
  • # Arguments
  • # id: ID of the object.
  • node(id: ID!): Node
  • # Lookup nodes by a list of IDs.
  • #
  • # Arguments
  • # ids: The list of node IDs.
  • nodes(ids: [ID!]!): [Node]!
  • # Lookup a organization by login.
  • #
  • # Arguments
  • # login: The organization's login.
  • organization(login: String!): Organization
  • # Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the
  • # root query object
  • relay: Query!
  • # Lookup a given repository by the owner and repository name.
  • #
  • # Arguments
  • # owner: The login field of a user or organizationn
  • # name: The name of the repository
  • repository(owner: String!, name: String!): Repository
  • # Lookup a repository owner (ie. either a User or an Organization) by login.
  • #
  • # Arguments
  • # login: The username to lookup the owner by.
  • repositoryOwner(login: String!): RepositoryOwner
  • # Lookup resource by a URL.
  • #
  • # Arguments
  • # url: The URL.
  • resource(url: URI): UniformResourceLocatable
  • # Perform a search across resources.
  • #
  • # Arguments
  • # first: Returns the first _n_ elements from the list.
  • # after: Returns the elements in the list that come after the
  • # specified global ID.
  • # last: Returns the last _n_ elements from the list.
  • # before: Returns the elements in the list that come before the
  • # specified global ID.
  • # query: The search string to look for.
  • # type: The types of search items to search within.
  • search(
  • first: Int,
  • after: String,
  • last: Int,
  • before: String,
  • query: String!,
  • type: SearchType!
  • ): SearchResultItemConnection!
  • # Lookup a user by login.
  • #
  • # Arguments
  • # login: The user's login.
  • user(login: String!): User
  • # The currently authenticated user.
  • viewer: User!
  • }