These are chat archives for mirumee/saleor

25th
Jul 2018
Miles
@milesstevenson
Jul 25 2018 03:37
Is it possible to use saleor only as a webservice and not be restricted in how to build the frontend.
I'd like to target it from the browser and mobile building the UIs the way I see fit with no restrictions.
Is this possible? O_o
Filip Kucharczyk
@Pacu2
Jul 25 2018 05:40
Hi @milesstevenson , we are currently working on transforming Saleor to be API-based (GraphQL) but it will take some more time
Filip Kucharczyk
@Pacu2
Jul 25 2018 05:56
First part of our GraphQL API was shipped in June, you can find some more information here https://medium.com/saleor/june-release-of-saleor-graphql-is-here-bf55cc8b500
Miles
@milesstevenson
Jul 25 2018 06:04
Why GraphQL as opposed to traditional REST. Curious.
s/./?
So as it stands now, saleor cannot be used as an REST API alone? The developer must adhere to the UI practices it enforces in its templates, or what have you?
Are there docs for the current GraphQL API coverage?
Filip Kucharczyk
@Pacu2
Jul 25 2018 08:27

Saleor cannot be used as an REST API in its current form, as most of the views are based on django static views.

We have some simple docs(beta) regarding the GraphQL API https://saleor.readthedocs.io/en/latest/architecture/graphql.html but AFAIK there's no coverage publicly listed, hopefully @elwoodxblues can give more insights on this.

We see some potential in GraphQL, trying to follow the global trend on shifting from REST to GraphQL as it gives more flexibility and possibilities.
Marcin Gębala
@maarcingebala
Jul 25 2018 09:01
@milesstevenson We're now in the middle of rethinking the structure of Saleor. The idea is to separate the storefront app from the core. We want to build the new storefront as a single-page app that uses GraphQL API to communicate with the backend. At the same time we want to continue developing the API (it's in beta now) and when it's ready we want to give the ability to use Saleor as a headless platform as well.
Aaron Oxborrow
@paste
Jul 25 2018 19:47
you’re not going to be using much of django at that point. just the ORM... and the admin?
do you still need django forms and validation with a SPA?
Marcin Gębala
@maarcingebala
Jul 25 2018 20:56
@paste The ORM, the API which is written entirely in Python/Graphene and all the business logic.
We would eventually drop the presentation layer of Django so the views, templates and forms.
That's the long term plan