Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL support #9176

Open
3 tasks
damianlegawiec opened this issue Jan 11, 2019 · 16 comments · May be fixed by #10025
Open
3 tasks

GraphQL support #9176

damianlegawiec opened this issue Jan 11, 2019 · 16 comments · May be fixed by #10025
Milestone

Comments

@damianlegawiec
Copy link
Member

@damianlegawiec damianlegawiec commented Jan 11, 2019

With the 3.7 release we've included the brand new Storefront API v2 which is a modern lightweight REST API based on JSON Api spec. We will continue to work on REST API in the form of the Platform API but alongside that effort, we would like to include GraphQL support for the Storefront part.

  • provide a single GraphQL endpoint to expose Storefront resources
  • integrate with CanCanCan authorization
  • include a GraphQL browser
@damianlegawiec damianlegawiec added this to the 4.0 milestone Jan 11, 2019
@bezoar17
Copy link

@bezoar17 bezoar17 commented Jan 29, 2019

Hi, I am interested in contributing to this issue.
Can elaborate on the first point, what do you mean by a single GQL endpoint ?

@SAVE-UP
Copy link

@SAVE-UP SAVE-UP commented Feb 16, 2019

A very good news...

@aaronsmulktis
Copy link

@aaronsmulktis aaronsmulktis commented Apr 11, 2019

Beautiful! Let me know what you need and I'll be happy to log some PRs so help move this feature along

@damianlegawiec damianlegawiec removed this from the 4.0 milestone Aug 5, 2019
@damianlegawiec damianlegawiec added this to the 4.1 milestone Aug 5, 2019
@siriushaha
Copy link

@siriushaha siriushaha commented Aug 31, 2019

Hi. I am interested in contributing towards GraphQL support using graphql-ruby since I have been using graphql-ruby on GraphQL backend for RoR 5.1 integrated from React 16.8/Apollo Client2.6/GraphQL. Let me know how to contribute for GraphQL support feature

@lasersox
Copy link

@lasersox lasersox commented Nov 6, 2019

Is somebody working on this feature? We're looking for a GraphQL based solution for ecommerce.

@damianlegawiec damianlegawiec removed this from the 4.1 milestone Dec 2, 2019
@damianlegawiec damianlegawiec added this to the 4.2 milestone Dec 2, 2019
@jhirbour
Copy link

@jhirbour jhirbour commented Jan 16, 2020

The link to https://spree-guides.now.sh/api/v2/storefront is broken:

Payment required
402: PAYMENT_REQUIRED
Code: DEPLOYMENT_BLOCKED

@damianlegawiec
Copy link
Member Author

@damianlegawiec damianlegawiec commented Jan 16, 2020

Is somebody working on this feature? We're looking for a GraphQL based solution for ecommerce.

@lasersox we plan to include GraphQL in Spree 4.2 or 4.3

The link to https://spree-guides.now.sh/api/v2/storefront is broken:

Payment required
402: PAYMENT_REQUIRED
Code: DEPLOYMENT_BLOCKED

This is the proper link: https://guides.spreecommerce.org/api/v2/storefront

@jhirbour
Copy link

@jhirbour jhirbour commented Jan 16, 2020

My understanding of GraphQL is that it supports Json-api as a backend. Someone would need to define a graphql schema that matches the schema that the v2 api supports.

@damianlegawiec
Copy link
Member Author

@damianlegawiec damianlegawiec commented Feb 23, 2020

My understanding of GraphQL is that it supports Json-api as a backend. Someone would need to define a graphql schema that matches the schema that the v2 api supports.

GraphQL will be a completely independent thing with JWT authentication. It will be a separate gem in the spree/spree repository without spree_api as a dependency. It's a clean start :)

@damianlegawiec damianlegawiec linked a pull request that will close this issue Mar 6, 2020
@2ndmehmet
Copy link

@2ndmehmet 2ndmehmet commented Apr 7, 2020

I tried using Spree with Hasura GraphQL engine. It is really working good. Hasura have actions, remote schemas and triggers. So it is really easy to integrate. These are only things i need to implement in spree:

  • Authentication && CanCanCan authorization.
  • Decoration.

If you are interested, please see how skilled the Hasura GraphQL engine is.

@lastmaj
Copy link

@lastmaj lastmaj commented Oct 29, 2020

Hello everyone.
What is the current status of this ? any updates ?

@damianlegawiec damianlegawiec removed this from the 4.2 milestone Nov 10, 2020
@damianlegawiec damianlegawiec added this to the 4.4 milestone Nov 10, 2020
@bastianhilton
Copy link

@bastianhilton bastianhilton commented Feb 22, 2021

I tried using Spree with Hasura GraphQL engine. It is really working good. Hasura have actions, remote schemas and triggers. So it is really easy to integrate. These are only things i need to implement in spree:

  • Authentication && CanCanCan authorization.
  • Decoration.

If you are interested, please see how skilled the Hasura GraphQL engine is.

curious about this setup, how did you link hasura to spree. Was it through remote schemas, if so what url did you use from spree rest api

@2ndmehmet
Copy link

@2ndmehmet 2ndmehmet commented Mar 4, 2021

I tried using Spree with Hasura GraphQL engine. It is really working good. Hasura have actions, remote schemas and triggers. So it is really easy to integrate. These are only things i need to implement in spree:

  • Authentication && CanCanCan authorization.
  • Decoration.

If you are interested, please see how skilled the Hasura GraphQL engine is.

curious about this setup, how did you link hasura to spree. Was it through remote schemas, if so what url did you use from spree rest api

I connected directly to db, then setup permissions in hasura. Then I mapped some rest apis to remote schemas.
Authentication solved with sharing jwt on spree and hasura. Decoration solved with resp apis but it is not effective.
I think it must offically integrated to hasura, spree maintainer can accept it, because it is the strongest tool of 202X's.

@damianlegawiec
Copy link
Member Author

@damianlegawiec damianlegawiec commented Mar 5, 2021

I tried using Spree with Hasura GraphQL engine. It is really working good. Hasura have actions, remote schemas and triggers. So it is really easy to integrate. These are only things i need to implement in spree:

  • Authentication && CanCanCan authorization.
  • Decoration.

If you are interested, please see how skilled the Hasura GraphQL engine is.

curious about this setup, how did you link hasura to spree. Was it through remote schemas, if so what url did you use from spree rest api

I connected directly to db, then setup permissions in hasura. Then I mapped some rest apis to remote schemas.

Authentication solved with sharing jwt on spree and hasura. Decoration solved with resp apis but it is not effective.

I think it must offically integrated to hasura, spree maintainer can accept it, because it is the strongest tool of 202X's.

Could you share / open source that code?

@2ndmehmet
Copy link

@2ndmehmet 2ndmehmet commented Mar 5, 2021

I tried using Spree with Hasura GraphQL engine. It is really working good. Hasura have actions, remote schemas and triggers. So it is really easy to integrate. These are only things i need to implement in spree:

  • Authentication && CanCanCan authorization.
  • Decoration.

If you are interested, please see how skilled the Hasura GraphQL engine is.

curious about this setup, how did you link hasura to spree. Was it through remote schemas, if so what url did you use from spree rest api

I connected directly to db, then setup permissions in hasura. Then I mapped some rest apis to remote schemas.
Authentication solved with sharing jwt on spree and hasura. Decoration solved with resp apis but it is not effective.
I think it must offically integrated to hasura, spree maintainer can accept it, because it is the strongest tool of 202X's.

Could you share / open source that code?

There is no code, all are configuration on hasura-ui and saved to db. To get all configurations as code, I need to find them and convert to a database migration or sql query.

@woohoou
Copy link

@woohoou woohoou commented Mar 21, 2021

it could be consider it use remote schema permissions in hasura
https://hasura.io/docs/latest/graphql/core/remote-schemas/remote-schema-permissions.html

@damianlegawiec damianlegawiec removed this from the 4.4 milestone Sep 4, 2021
@damianlegawiec damianlegawiec added this to the 4.5 milestone Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.