Skip to content

Commit fabd64b

Browse files
committed
added help functions to inspect requests
1 parent 22e9696 commit fabd64b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graphql.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,13 @@ type file struct {
307307
Name string
308308
R io.Reader
309309
}
310+
311+
// RequestVars gets the variables from a request.
312+
func RequestVars(req *Request) map[string]interface{} {
313+
return req.vars
314+
}
315+
316+
// RequestQuery gets the query from the request.
317+
func RequestQuery(req *Request) string {
318+
return req.q
319+
}

0 commit comments

Comments
 (0)