mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-23 11:22:10 +00:00
fix: set id not taking into account in set search (#563)
This commit is contained in:
parent
1a52a6f29a
commit
4c96331b93
@ -0,0 +1,29 @@
|
|||||||
|
meta {
|
||||||
|
name: 562 - GraphQL set request is not returning the correct value
|
||||||
|
type: graphql
|
||||||
|
seq: 7
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
set(id: "{{SET_ID}}") {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
SET_ID: swsh1
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
res.body.data.set.id: eq {{SET_ID}}
|
||||||
|
}
|
28
.bruno/graphql/card.bru
Normal file
28
.bruno/graphql/card.bru
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
meta {
|
||||||
|
name: card
|
||||||
|
type: graphql
|
||||||
|
seq: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
card(id: "{{ID}}") {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
ID: swsh1-136
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
res.body.data.card.id: eq {{ID}}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
meta {
|
meta {
|
||||||
name: GraphQL API
|
name: cards
|
||||||
type: graphql
|
type: graphql
|
||||||
seq: 1
|
seq: 1
|
||||||
}
|
}
|
29
.bruno/graphql/serie.bru
Normal file
29
.bruno/graphql/serie.bru
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
meta {
|
||||||
|
name: serie
|
||||||
|
type: graphql
|
||||||
|
seq: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
serie(id: "{{ID}}") {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
ID: swsh
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
res.body.data.serie.id: eq {{ID}}
|
||||||
|
}
|
24
.bruno/graphql/series.bru
Normal file
24
.bruno/graphql/series.bru
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
meta {
|
||||||
|
name: series
|
||||||
|
type: graphql
|
||||||
|
seq: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
series {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
}
|
29
.bruno/graphql/set.bru
Normal file
29
.bruno/graphql/set.bru
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
meta {
|
||||||
|
name: set
|
||||||
|
type: graphql
|
||||||
|
seq: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
set(id: "{{SET_ID}}") {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
SET_ID: swsh1
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
res.body.data.set.id: eq {{SET_ID}}
|
||||||
|
}
|
24
.bruno/graphql/sets.bru
Normal file
24
.bruno/graphql/sets.bru
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
meta {
|
||||||
|
name: sets
|
||||||
|
type: graphql
|
||||||
|
seq: 4
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{BASE_URL}}/v2/graphql
|
||||||
|
body: graphql
|
||||||
|
auth: none
|
||||||
|
}
|
||||||
|
|
||||||
|
body:graphql {
|
||||||
|
query Pouet {
|
||||||
|
sets {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {
|
||||||
|
res.status: eq 200
|
||||||
|
}
|
@ -29,7 +29,7 @@ const middleware = (fn: (lang: SupportedLanguages, query: Query<object>) => any)
|
|||||||
// get the locale directive
|
// get the locale directive
|
||||||
const lang = getLang(e)
|
const lang = getLang(e)
|
||||||
|
|
||||||
const query = recordToQuery(data.filters ?? {})
|
const query = recordToQuery(data.filters ?? data)
|
||||||
|
|
||||||
// Deprecated code handling
|
// Deprecated code handling
|
||||||
if (data.pagination) {
|
if (data.pagination) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user