mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
Fix GraphQL syntax, supply operation name
This commit is contained in:
parent
2d0d4546ec
commit
7041e37eea
@ -19,6 +19,7 @@ type addonSlugRequest struct {
|
||||
Variables struct {
|
||||
Slug string `json:"slug"`
|
||||
} `json:"variables"`
|
||||
OperationName string `json:"operationName"`
|
||||
}
|
||||
|
||||
// addonSlugResponse is received from the CurseProxy GraphQL api to get the id from a slug
|
||||
@ -39,13 +40,12 @@ func modIDFromSlug(slug string) (int, error) {
|
||||
request := addonSlugRequest{
|
||||
Query: `
|
||||
query getIDFromSlug($slug: String) {
|
||||
{
|
||||
addons(slug: $slug) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
OperationName: "getIDFromSlug",
|
||||
}
|
||||
request.Variables.Slug = slug
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user