Comments (3)
Hello!
There are plenty of differences, but main one is schema-first approach to creating GraphQL APIs.
In Ariadne you describe your schema using SDL language and you use simple and easy to memorize Python API to bind your business logic to this schema. In Graphene you define your schema using Python types only, and then schema is generated for you from those types. There's example code in our readme if you want to see this pattern in action.
There are plenty of reasons why we used new approach vs Graphene's:
- All learning materials, examples and snippets outside of Graphene are using SDL for describing types. With Ariadne we don't need to learn how to translate those examples to Graphene types before using them.
- Frontend dev tools are schema first, and expect your GraphQL to be available either as running server, or
.graphql
files somewhere in your project repo. Saleor required extra setup for those tools to work. In Ariadne this is the default. - SDL is actually easy to learn and fast to write. It's also a language that both backend and frontend devs speak, which is nice gain for projects like Saleor. Changes to SDL also produce nice diffs.
As for other reasons, we also wanted to have a fresh start and do some other things differently. For example, there are situations when you would like to have two GraphQL API's in project, to support two mostly separate clients (storefront and admin dashboard). This use case is (was?) not supported by Graphene when we needed it, leaving us with single API mixing user-only data with admin-only information, leading to weird bugs where something that shouldn't be, leaked to store users. In Ariadne there is no global type registry, which allows us to have as many different GraphQL API's in single codebase as we want, while keeping things explicit and easy to navigate.
There are plenty other reasons for fresh start like having thin API that's easy to dive into and extend as you need it, and opening the path for implementing some extra features that were important to us, like query batching or cost validation.
And can we use Graphene-django in Saleor?
Please ask on Saleor's forum or github repo.
I hope this helps you ;)
Cheers!
from ariadne.
@rafalp thanks for this comparison! Would it be possible to integrate this information in the docs somewhere?
from ariadne.
We have new site in the pipeline that will include this. Stay tuned :)
from ariadne.
Related Issues (20)
- GraphiQL is using react development HOT 1
- Replace ApolloTracing with simple tracing extension HOT 3
- Rename main branch to `main` HOT 1
- Feature request: cache query parsing and validation HOT 10
- Breaking changes to Extension not noted in 0.20 changelog HOT 6
- Reference resolver HOT 2
- GraphiQL is not rendering (Explorer plugin error)
- Custom JSON implementation HOT 2
- Cannot install 0.15 HOT 2
- Expose all graphiql parameters HOT 1
- Union as directive argument HOT 4
- No way to send custom error from `on_connect` when using GraphQLTransportWSHandler
- execution_context_class argument for graphql_sync raises an error HOT 4
- Subscription Chat Application full example does not return message data HOT 2
- "str" is incompatible with "GraphQLSchema" HOT 2
- Update GraphQL fixing logic
- Python 3.12 has deprecation warnings
- Starlette integration tests are broken
- Re-tag the source HOT 1
- Ariadne `graphql` and `graphql_sync` will attempt to execute `subscription` operations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ariadne.