Files
hoppscotch/store/state.js
Dmitry Yankowski 7022ef5f7e Fix variables JSON string
I don't have any variables set, and when running a mutation; I get the following error:

```
Error SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at VueComponent._callee$ (graphql.vue?f047:505)
    at tryCatch (runtime.js?96cf:45)
    at Generator.invoke [as _invoke] (runtime.js?96cf:271)
    at Generator.prototype.<computed> [as next] (runtime.js?96cf:97)
    at asyncGeneratorStep (asyncToGenerator.js?1da1:3)
    at _next (asyncToGenerator.js?1da1:25)
    at eval (asyncToGenerator.js?1da1:32)
    at new Promise (<anonymous>)
    at VueComponent.eval (asyncToGenerator.js?1da1:21)
```

Setting the `variablesJSONString` variable to the correct default (`{}`) fixes this issue :)
2020-02-23 19:42:59 -05:00

39 lines
723 B
JavaScript

export default () => ({
request: {
method: "GET",
url: "https://httpbin.org",
path: "/get",
label: "",
auth: "None",
httpUser: "",
httpPassword: "",
passwordFieldType: "password",
bearerToken: "",
headers: [],
params: [],
bodyParams: [],
rawParams: "",
rawInput: false,
requestType: "",
contentType: ""
},
gql: {
url: "https://rickandmortyapi.com/graphql",
headers: [],
variablesJSONString: "{}",
query: ""
},
oauth2: {
tokens: [],
tokenReqs: [],
tokenReqSelect: "",
tokenReqName: "",
accessTokenName: "",
oidcDiscoveryUrl: "",
authUrl: "",
accessTokenUrl: "",
clientId: "",
scope: ""
}
});