You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to create a simple GraphiQL client for our project and used the graphiql package with create-react-app.
Here is how render() looks like in my App.js. Everyting works fine except the <GraphiQL.Button />. Whenever I add it inside Toolbar I get "Element type is invalid: expected a string (for built-in components)..." What am I missing? Why cannot I add buttons? Thanks.
import './App.css';
import React from 'react';
import GraphiQL from 'graphiql';
import { getIntrospectionQuery, buildClientSchema } from 'graphql';
import GraphiQLExplorer from 'graphiql-explorer'
import "graphiql/graphiql.css"
........
render() {
const { query, schema } = this.state
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am trying to create a simple GraphiQL client for our project and used the graphiql package with create-react-app.
Here is how render() looks like in my App.js. Everyting works fine except the <GraphiQL.Button />. Whenever I add it inside Toolbar I get "Element type is invalid: expected a string (for built-in components)..." What am I missing? Why cannot I add buttons? Thanks.
import './App.css';
import React from 'react';
import GraphiQL from 'graphiql';
import { getIntrospectionQuery, buildClientSchema } from 'graphql';
import GraphiQLExplorer from 'graphiql-explorer'
import "graphiql/graphiql.css"
........
render() {
const { query, schema } = this.state
}
}
Beta Was this translation helpful? Give feedback.
All reactions