OBJECT

Query

The query root of GitHub's GraphQL interface.

link GraphQL Schema definition

1type Query {
2
3# Fetches an object given its ID.
4#
5# Arguments
6# id: ID of the object.
7node(id: ID!): Node
8
9# Lookup nodes by a list of IDs.
10#
11# Arguments
12# ids: The list of node IDs.
13nodes(ids: [ID!]!): [Node]!
14
15# Lookup a organization by login.
16#
17# Arguments
18# login: The organization's login.
19organization(login: String!): Organization
20
21# Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the
22# root query object
23relay: Query!
24
25# Lookup a given repository by the owner and repository name.
26#
27# Arguments
28# owner: The login field of a user or organizationn
29# name: The name of the repository
30repository(owner: String!, name: String!): Repository
31
32# Lookup a repository owner (ie. either a User or an Organization) by login.
33#
34# Arguments
35# login: The username to lookup the owner by.
36repositoryOwner(login: String!): RepositoryOwner
37
38# Lookup resource by a URL.
39#
40# Arguments
41# url: The URL.
42resource(url: URI): UniformResourceLocatable
43
44# Perform a search across resources.
45#
46# Arguments
47# first: Returns the first _n_ elements from the list.
48# after: Returns the elements in the list that come after the specified global ID.
49# last: Returns the last _n_ elements from the list.
50# before: Returns the elements in the list that come before the specified global
51# ID.
52# query: The search string to look for.
53# type: The types of search items to search within.
54search(
55first: Int,
56after: String,
57last: Int,
58before: String,
59query: String!,
60type: SearchType!
61): SearchResultItemConnection!
62
63# Lookup a user by login.
64#
65# Arguments
66# login: The user's login.
67user(login: String!): User
68
69# The currently authenticated user.
70viewer: User!
71
72}