Skip Intro »
If you're
unfamiliar
with
JSONAPI,
think
"RESTful GraphQL created by Yehuda Katz"
Here's a simple Suite app:
This API now supports
Sparse Fieldsets,
Sorting,
Pagination,
statistics, and
Filtering.
Though we're using
ActiveRecord
in these examples, the same patterns
apply to
ANY ORM or DATASTORE
including
HTTP calls.
Blend SQL and NoSQL in a
single
request.
Let's access the API using our
Javascript Client,
which you can think of as
"
ActiveRecord
in the browser"
Associations are simple and customizable:
Associations are
deep queryable. In other words,
you could fetch the Post and only its
active
comments,
sorted by
created_at
descending.
This applies to your
entire graph of data.
The server-side code would be nothing more than:
At this point, You may be thinking:
"Is this just a bunch of incomprehensible ruby magic
😬
?"
No.
We're simply parsing the request, removing boilerplate, and supplying
sensible defaults because we believe in
convention over configuration.
Let's make our filter a prefix query:
From filtering to pagination, these are all just
customizable lambdas.
You have
complete control
of the query.
Just as you can
Query
the full graph of data, you can also
Persist
the full graph of data in a
single request:
All of this is easily validated with
end-to-end
integration test patterns
that ensure
backwards-compatibility:
...and
automatically documented
in Swagger:
There's
so much more
to talk about. To get your feet wet, check out
our
Quickstart,
or step-by-step
Tutorial.
We also have
comprehensive documentation
on the
Server
and on the
Client.
Join our
Slack Chat
to ask questions or say hi - we'd
love to meet you and hear what you think ❤️