1
0
mirror of https://github.com/NickKaramoff/toot synced 2025-01-30 00:55:08 +01:00

Use GraphQL variables

This commit is contained in:
Nikita Karamov 2025-01-21 18:19:27 +01:00
parent 3b279c2e9e
commit 1a9046b0b9
No known key found for this signature in database

View File

@ -34,7 +34,8 @@ const getInstancesForProject = async (
const response = await fetch("https://api.fediverse.observer/", {
headers,
body: JSON.stringify({
query: `{nodes(status:"UP",softwarename:"${project}"){domain score active_users_monthly total_users}}`,
query: `query($project:String!){nodes(status:"UP",softwarename:$project){domain score active_users_monthly total_users}}`,
variables: { project },
}),
method: "POST",
});