Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class GraphQLBinApp extends React.Component<Props & ReduxProps, State> {
}
}, 1000)

fetch('https://api.graph.cool/simple/v1/cj81hi46q03c30196uxaswrz2', {
fetch('https://api.graphqlbin.com', {
method: 'post',
headers: {
'Content-Type': 'application/json',
Expand Down
30 changes: 14 additions & 16 deletions packages/graphql-playground-react/src/state/sharing/sharingSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ import { safely } from '../../utils'
function* share() {
const state = yield makeSharingState()
const endpoint = yield select(getEndpoint)
const res = yield fetch(
'https://api.graph.cool/simple/v1/cj81hi46q03c30196uxaswrz2',
{
method: 'post',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: `
const res = yield fetch('https://api.graphqlbin.com/', {
method: 'post',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: `
mutation ($session: String! $endpoint: String!) {
addSession(session: $session endpoint: $endpoint) {
id
}
}
`,
variables: {
session: JSON.stringify(state),
endpoint,
},
}),
},
).then(data => data.json())
variables: {
session: JSON.stringify(state),
endpoint,
},
}),
}).then(data => data.json())

const shareUrl = `https://graphqlbin.com/v2/${res.data.addSession.id}`
yield put(setShareUrl(shareUrl))
}
Expand Down