Skip to content

Instantly share code, notes, and snippets.

@madsmtm
Last active September 5, 2019 14:50
Show Gist options
  • Save madsmtm/2787c8a8a2753c3a3e6c22e2757b943e to your computer and use it in GitHub Desktop.
Save madsmtm/2787c8a8a2753c3a3e6c22e2757b943e to your computer and use it in GitHub Desktop.
A very incomplete description of Facebook's GraphQL schema (from 2017)
schema {
Query: Query
Mutation: Mutation
}
type Query() {
viewer: Viewer!
entities_named: SearchableEntitiesQuery!
}
type Viewer() {
message_threads: ViewerMessageThreadsConnection
}
type ViewerMessageThreadsConnection {
nodes: [MessageThread!]!
edges: ViewerMessageThreadsEdge!
has_next_page: Boolean!
has_previous_page: Boolean!
}
type ViewerMessageThreadsEdge {
node: [MessageThread!]!
cursor: ID!
}
type SearchableEntitiesQuery() {
search_results: SearchableResultsConnection
}
type SearchableResultsConnection {
nodes: [Searchable!]!
edges: SearchableResultsEdge!
has_next_page: Boolean!
has_previous_page: Boolean!
}
type SearchableResultsEdge {
node: [Searchable!]!
cursor: ID!
}
type Searchable {
# One of User, MessageThread, Page or Group
}
type User {
name: String!
id: Int!
}
type MessageThread {
name: String
thread_key: MessageThreadKey
image:
is_group_thread:
all_participants {
nodes {
messaging_actor {
@User
}
}
}
other_participants:
}
type MessageThreadKey {
thread_fbid: String
other_user_id: Int
legacy_thread_id: String
}
type MessageThreadImage {
thread_fbid: Int
ohter_user_id: Int
}
type UserMessage {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment