feat: add GraphQL request support#12
Conversation
Add a `graphql` block (query/queryFromFile/variables/operationName) on
api.request and mock interaction requests. TestCaseResolver composes it
into the standard { query, variables, operationName } body at hydration
time, defaults method to POST only if unset, and adds
Content-Type: application/json only if not already present.
Add array-wildcard `*` segment support to ignore/pattern matcher paths
(e.g. errors__*__path) via normalize-and-compare on array indices, so a
GraphQL errors[] array can be matched regardless of length.
Wire HotChocolate into the example User.Api (Query/Mutation resolvers,
UserErrorFilter for error extensions) and add component + integration
test coverage. Add doc/graphql-support.md and update test-file-format.md,
matchers-and-patterns.md, README, and CLAUDE.md accordingly.
PR Summary by QodoAdd GraphQL request DSL and wildcard array matching for matchers
AI Description
Diagram
High-Level Assessment
Files changed (31)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
17 rules 1.
|
…atching BuildParentTemplate and array-index regex normalization ran once per matching JProperty during tree traversal. Hoist template construction to once per matcher rule, use a compiled static regex, and skip normalization entirely when neither the template nor the path contains an array index.
Summary
graphqlblock (query/queryFromFile/variables/operationName) onapi.requestand mock interaction requests —TestCaseResolvercomposes the standard{ query, variables, operationName }body at hydration time, defaultsmethodtoPOSTonly if unset, and addsContent-Type: application/jsononly if not already present.*segment support toignore/patternmatcher paths (e.g.errors__*__path) via normalize-and-compare on array indices, so a GraphQLerrors[]array can be matched regardless of length.User.Api(Query/Mutationresolvers,UserErrorFilterfor error extensions) and add component + integration test coverage.doc/graphql-support.mdand updatetest-file-format.md,matchers-and-patterns.md,README.md,Package.Readme.md, andCLAUDE.mdaccordingly.Test plan
make unit— 268/268 passing (net9.0 + net10.0)make component— 20/20 passingmake integration— 29/29 passing