Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

graphql signature diverges with standard graphql-js's one #4

Closed
alexstrat opened this issue Jan 16, 2019 · 2 comments
Closed

graphql signature diverges with standard graphql-js's one #4

alexstrat opened this issue Jan 16, 2019 · 2 comments
Labels

Comments

@alexstrat
Copy link
Contributor

alexstrat commented Jan 16, 2019

The common signature of the function graphql in reactive-graphql differs from graphql-js.

With graphql-js the signature is roughly:

import { graphql } from 'graphql'; 

graphql(schema: GraphQLSchema, query: Source | string, context?: object)..

While with reactive-graphql:

import graphql from 'reactive-graphql'; 

graphql(query: DocumentNode, schema: GraphQLSchema, context: object) ..

Note the differences:

  • the default import vs the "named" import
  • query and schema arguments position are inverted
  • the type of query is a string (or Source) in standard implementation and transformed in DocumentNode in the implementation while in reactive version it expects a DocumentNode directly
  • context is optional

These differences are more or less minor, but wanted to know if they are intended or not, and thus if maintainer would be open to accepting a PR fixing this.

@alexstrat
Copy link
Contributor Author

#6 can be added as divergent signature issue

DanielMSchmidt pushed a commit that referenced this issue Jan 21, 2019
BREAKING CHANGE: All imports need to be `import {graphql}` instead of
`import graphql` from now on

Closes #4
DanielMSchmidt pushed a commit that referenced this issue Jan 21, 2019
BREAKING CHANGE:  Its now schema, query instead of query, schema, so the
inputs in all projects need to change

Closes #4
DanielMSchmidt pushed a commit that referenced this issue Jan 21, 2019
DanielMSchmidt pushed a commit that referenced this issue Jan 22, 2019
BREAKING CHANGE:  Its now schema, query instead of query, schema, so the
inputs in all projects need to change

Closes #4
DanielMSchmidt pushed a commit that referenced this issue Jan 22, 2019
@mesosphere-frontend-ci
Copy link

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants