mirror of
https://github.com/NickKaramoff/toot
synced 2025-01-30 17:15:17 +01:00
Use GraphQL variables
This commit is contained in:
parent
3b279c2e9e
commit
1a9046b0b9
@ -34,7 +34,8 @@ const getInstancesForProject = async (
|
|||||||
const response = await fetch("https://api.fediverse.observer/", {
|
const response = await fetch("https://api.fediverse.observer/", {
|
||||||
headers,
|
headers,
|
||||||
body: JSON.stringify({
|
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",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user