Migrate from REST to GraphQL
Last updated
Last updated
Only the red text parts are different.
Repositories
Backend differences
REST :
Implementation of
book.apis.py
book.serializers.py
Middleware cors : bypass the cross site origin.
Handle snake-case and camel-case inconsistency.
GraphQL :
Implementation of
book.schema.py
Middleware cors : bypass the cross site origin and OPTIONS
method.
Frontend differences The difference is only the database query service.
REST : Use URL end point. category.js
request.js
GraphQL : Always use POST
method to submit query
. category.js
request.js