GQLSession.ts (hoppscotch-2.0.0) | : | GQLSession.ts (hoppscotch-2.1.0) | ||
---|---|---|---|---|
skipping to change at line 19 | skipping to change at line 19 | |||
type GQLSession = { | type GQLSession = { | |||
request: HoppGQLRequest | request: HoppGQLRequest | |||
schema: string | schema: string | |||
response: string | response: string | |||
} | } | |||
export const defaultGQLSession: GQLSession = { | export const defaultGQLSession: GQLSession = { | |||
request: makeGQLRequest({ | request: makeGQLRequest({ | |||
name: "", | name: "", | |||
url: "https://rickandmortyapi.com/graphql", | url: "https://echo.hoppscotch.io/graphql", | |||
headers: [], | headers: [], | |||
variables: `{ "id": "1" }`, | variables: `{ "id": "1" }`, | |||
query: `query GetCharacter($id: ID!) { | query: `query Request { | |||
character(id: $id) { | method | |||
id | url | |||
name | headers { | |||
key | ||||
value | ||||
} | } | |||
}`, | } | |||
`, | ||||
}), | }), | |||
schema: "", | schema: "", | |||
response: "", | response: "", | |||
} | } | |||
const dispatchers = defineDispatchers({ | const dispatchers = defineDispatchers({ | |||
setSession(_: GQLSession, { session }: { session: GQLSession }) { | setSession(_: GQLSession, { session }: { session: GQLSession }) { | |||
return session | return session | |||
}, | }, | |||
setName(curr: GQLSession, { newName }: { newName: string }) { | setName(curr: GQLSession, { newName }: { newName: string }) { | |||
End of changes. 3 change blocks. | ||||
6 lines changed or deleted | 9 lines changed or added |