Fix issue with fuzzbuzz config
This commit is contained in:
parent
b666876064
commit
c03f7d6576
|
@ -242,18 +242,17 @@ query {
|
|||
|
||||
### Using variables
|
||||
|
||||
Variables and their values can be passed along side the GraphQL query. Using variables makes for better client side code as well as improved server side
|
||||
caching. The build-in web ui also hass support for variables. Not having to manupilate your GraphQL query string to insert values into it makes for cleaner
|
||||
Variables (`$product_id`) and their values (`"product_id": 5`) can be passed along side the GraphQL query. Using variables makes for better client side code as well as improved server side SQL query caching. The build-in web-ui also supports setting variables. Not having to manipulate your GraphQL query string to insert values into it makes for cleaner
|
||||
and better client side code.
|
||||
|
||||
```javascript
|
||||
// define the request object keeping the query and the variables seperate
|
||||
// Define the request object keeping the query and the variables seperate
|
||||
var req = {
|
||||
query: '{ product(id: $product_id) { name } }' ,
|
||||
variables: { "product_id": 5 }
|
||||
}
|
||||
|
||||
// use the fetch api to make the query
|
||||
// Use the fetch api to make the query
|
||||
fetch('http://localhost:8080/api/v1/graphql', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
|
|
@ -4,8 +4,8 @@ targets:
|
|||
language: go
|
||||
version: "1.12"
|
||||
corpus: ./corpus
|
||||
#memory_limit: 1000 # in megabytes
|
||||
#timeout: 500 # in milliseconds
|
||||
memory_limit: "100" # in megabytes
|
||||
timeout: "500" # in milliseconds
|
||||
harness:
|
||||
function: FuzzerEntrypoint
|
||||
# package defines where to import FuzzerEntrypoint from
|
||||
|
|
|
@ -45,9 +45,15 @@ func compareOp(op1, op2 Operation) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkParse(b *testing.B) {
|
||||
|
||||
func TestCompile(t *testing.T) {
|
||||
qcompile, _ := NewCompiler(Config{})
|
||||
_, err := qcompile.CompileQuery(`query {
|
||||
product(id: 15) {
|
||||
id
|
||||
name
|
||||
}
|
||||
}`)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ func (com *Compiler) compileQuery(op *Operation) (*Query, error) {
|
|||
}
|
||||
|
||||
fil, ok := com.fm[selRoot.Table]
|
||||
if !ok {
|
||||
if !ok || fil == nil {
|
||||
fil = com.fl
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue