Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set id not taking into account in set search #563

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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 changes: 28 additions & 0 deletions .bruno/graphql/card.bru
Original file line number Diff line number Diff line change
@@ -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}}
}
2 changes: 1 addition & 1 deletion .bruno/graphql.bru → .bruno/graphql/cards.bru
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
meta {
name: GraphQL API
name: cards
type: graphql
seq: 1
}
Expand Down
29 changes: 29 additions & 0 deletions .bruno/graphql/serie.bru
Original file line number Diff line number Diff line change
@@ -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 changes: 24 additions & 0 deletions .bruno/graphql/series.bru
Original file line number Diff line number Diff line change
@@ -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 changes: 29 additions & 0 deletions .bruno/graphql/set.bru
Original file line number Diff line number Diff line change
@@ -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 changes: 24 additions & 0 deletions .bruno/graphql/sets.bru
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion server/src/V2/graphql/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const middleware = (fn: (lang: SupportedLanguages, query: Query<object>) => any)
// get the locale directive
const lang = getLang(e)

const query = recordToQuery(data.filters ?? {})
const query = recordToQuery(data.filters ?? data)

// Deprecated code handling
if (data.pagination) {
Expand Down
Loading