Skip to content

Conversation

alanpoulain
Copy link

Like GraphiQL, we should be able to give the fetcher instead of the schema.

@sgrove
Copy link
Contributor

sgrove commented Sep 3, 2019

@alanpoulain This seems like a decent idea, but want to make sure I understand the use-case.

Is this for people using graphiql-explorer outside of GraphiQL?

@alanpoulain
Copy link
Author

No, it's not. It allows to avoid to write this:

    fetcher({
      query: getIntrospectionQuery()
    }).then(result => {
      this.setState({ schema: buildClientSchema(result.data) });
    });
  }

This can be useful in some situations (for instance in this PR api-platform/core#2951, we cannot use the graphql package).

@alanpoulain
Copy link
Author

It has been rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants