Skip to content

Commit

Permalink
Merge pull request quarkusio#45228 from jmartisk/srgql-2.12.0
Browse files Browse the repository at this point in the history
SmallRye GraphQL 2.12.0
  • Loading branch information
jmartisk authored Jan 3, 2025
2 parents fc6ee78 + d8576e6 commit 45ae423
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<smallrye-health.version>4.1.0</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>4.0.5</smallrye-open-api.version>
<smallrye-graphql.version>2.11.0</smallrye-graphql.version>
<smallrye-graphql.version>2.12.0</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.7.1</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.6.1</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.2</smallrye-context-propagation.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ public void testAddAndRemoveFieldChange() {
.statusCode(200)
.and()
.body(CoreMatchers.containsString(
"{\"errors\":[{\"message\":\"Validation error (FieldUndefined@[foo/foo]) : Field 'foo' in type 'TestPojo' is undefined\",\"locations\":[{\"line\":7,\"column\":5}],\"extensions\":{\"classification\":\"ValidationError\"}}],\"data\":null}"));
"{\"errors\":[{\"message\":\"Validation error (FieldUndefined@[foo/foo]) : Field 'foo' in type 'TestPojo' is undefined\",\"locations\":[{\"line\":7,\"column\":5}],\"extensions\":{\"classification\":\"ValidationError\"}}]}"))
.and()
// The response should not contain the "data" field.
// See: https://spec.graphql.org/draft/#sec-Response-Format
//// If the request included execution, the response map must contain an entry with key data.
//// The value of this entry is described in the "Data" section.
//// If the request failed before execution due to a syntax error, missing information,
//// or validation error, this entry must not be present.
.body(CoreMatchers.not(CoreMatchers.containsString("\"data\":null")));
LOG.info("Initial request done");

// Make a code change (add a field)
Expand Down Expand Up @@ -94,7 +102,9 @@ public void testAddAndRemoveFieldChange() {
.statusCode(200)
.and()
.body(CoreMatchers.containsString(
"{\"errors\":[{\"message\":\"Validation error (FieldUndefined@[foo/foo]) : Field 'foo' in type 'TestPojo' is undefined\",\"locations\":[{\"line\":7,\"column\":5}],\"extensions\":{\"classification\":\"ValidationError\"}}],\"data\":null}"));
"{\"errors\":[{\"message\":\"Validation error (FieldUndefined@[foo/foo]) : Field 'foo' in type 'TestPojo' is undefined\",\"locations\":[{\"line\":7,\"column\":5}],\"extensions\":{\"classification\":\"ValidationError\"}}]}"))
.and()
.body(CoreMatchers.not(CoreMatchers.containsString("\"data\":null")));

LOG.info("Code change done - field removed");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
}
]
}
],
"data": null
]
}

0 comments on commit 45ae423

Please sign in to comment.