All Collections
Documentation
GraphQL Documentation
What can GraphQL do with AnnounceKit?
What can GraphQL do with AnnounceKit?

Documentation for GraphQL API

Updated over a week ago

The GraphQL API gives you full creative control of your AnnounceKit to build customized solutions for your application, posting automatically from a platform trigger, extracting data for analytics, and connecting different platforms, ... the possibilities are near limitless.


How to get started?

When you log in to AnnounceKit, you can start using GraphQL IDE immediately without supplying a Basic Authentication token or any Cookies.

You'll be greeted with the following root types:
โ€‹
1) Query: Helps with fetching and gathering data from your AnnounceKit project.

2) Mutation: Helps with inserting, updating, or deleting data with mutations.

How GraphQL works is that there are main fields and subfields for each query, mutation, and subscription. GraphQL is designed to allow clients to specify exactly what data they need, minimizing over-fetching or under-fetching of data.

The basic workflow of GraphQL is

  • Start with either a query or mutation

  • Select the field you want to work on (blue fields)

  • Provide the necessary field details (purple fields)

  • Select or provide the subfield you want to specify (yellow fields)

Let's break down the following Query, which helps with fetching the ID and the name of your active project.

On the right side of our GraphQL, if you click on Query, you'll be greeted with many queries for you to gather data from your AnnounceKit project.

For this example, we are using the "me" query and their subfields.

As you can see, the query me has one subfield user, which has its own subfield to gather the exact data you need to gather from your project.

{ 
me {
active_project {
id
name
}
}
}

When we click on User, we can see the subfield "active_project", which has its own subfields to gather data from.

{ 
me {
active_project {
id
name
}
}
}

For the purposes of this example, we will be typing "ID" and "name" under "active_project" since we want the ID and the name of our AnnounceKit project.

{ 
me {
active_project {
id
name
}
}
}

And voila!

You can run this query by clicking the link right here!

Did this answer your question?