Using GraphiQL.Button component returns "Element type is invalid: expected a string (for built-in components)..." #3189
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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