Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import { render } from 'react-dom';
import GraphiQL from 'graphiql';
import 'graphiql/graphiql.css';
const Logo = () => <span>My Corp</span>;
// See GraphiQL Readme - Advanced Usage section for more examples like this
GraphiQL.Logo = Logo;
const App = () => (
{
const data = await fetch(
'https://swapi-graphql.netlify.com/.netlify/functions/index',
{
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(graphQLParams),
credentials: 'include',
},
import React, { Component } from 'react';
import GraphiQL from 'graphiql';
import fetch from 'isomorphic-fetch';
import Schema from './schema.js';
import { graphql } from 'graphql';
GraphiQL.Logo = class Logo extends Component {
render() {
let style = {
fontWeight: 800,
fontSize: 16,
color: '#252525'
};
return (
<span style="{style}">Learn GraphQL Sandbox</span>
);
}
}
export default class App extends Component {
fetchData({query, variables}) {
let queryVariables = {};
const logo = children.find(child => child.type === GraphiQL.Logo);
const footer = children.find(child => child.type === GraphiQL.Footer);
import React, { Component } from 'react';
import GraphiQL from 'graphiql';
import fetch from 'isomorphic-fetch';
import gqlSchema from './schema.js';
import { graphql } from 'graphql';
GraphiQL.Logo = class Logo extends Component {
render() {
let style = {
fontWeight: 800,
fontSize: 16,
color: "#252525"
};
return (
<span style="{style}">Learn GraphQL Sandbox</span>
);
}
}
export default class App extends Component {
fetchData({query, variables}) {
let queryVariables = {};