Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonico/3a9bbf3b4f2ead8df3caab9e0ad20390 to your computer and use it in GitHub Desktop.
Save jonico/3a9bbf3b4f2ead8df3caab9e0ad20390 to your computer and use it in GitHub Desktop.
GraphQL Examples with GitHub business account
query getOrgsInBusiness($slug: String!) {
business(slug: $slug) {
... on Business {
name
resourcePath
avatarUrl
members(first: 100) {
edges {
organizations(first: 100) {
edges {
node {
login
}
}
}
node {
login
}
}
}
}
}
}
query getOrgsInBusiness($slug: String!) {
business(slug: $slug) {
... on Business {
name
resourcePath
avatarUrl
organizations(first: 100) {
edges {
node {
login
}
}
}
}
}
}
query getBusiness($slug: String!) {
business(slug: $slug) {
... on Business {
adminInfo {
outsideCollaborators(first: 10, orderBy: {field: LOGIN, direction: DESC}) {
edges {
node {
login
}
}
}
}
}
}
}
@jonico
Copy link
Author

jonico commented Mar 14, 2019

needs admin:business scope and Accept: application/vnd.github.gwenpool-preview+json header, slug should be the name of your business account (remove the https://github.com/businesses/" part from the URL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment