Skip to main content

RAPID and GraphQL

RAPID and GraphQL both provide a means of describing and requesting data from a service that represents a graph of data.

Schema Description

In GraphQL, the schema of a service can be described through introspection.

In RAPID, the schema of a service can be described through a request to the $metadata endpoint of the service.

GraphQL defines a simple syntax for defining the shape of a service. Rapid also defines a simple Resource Description Language called RSDL.

Query Syntax

In a GraphQL query, the developer describes the properties to be retrieved, and depth traversed, through a JSON-like structure.

In a RAPID query, the developer describes the properties to be retrieved through a projection, and the depth traversed through an expansion operator.

Filter

GraphQL does not define predicates that can be applied to filter the membership of the result. Instead, GraphQL extensions such as OpenCRUD define use custom operations, defined in schema, to define each type of filter operation.

While RAPID supports custom functions that may be used to encapsulate business logic or other predefined operations, it also defines a filter syntax that can be used to support dynamic queries against properties described by the service as queryable, providing a more flexible way for developers to interact with the data.

Use of HTTP

GraphQL submits requests using HTTP POST, passing the query in the body of the request.

RAPID builds on REST, using HTTP verbs to GET (retrieve), POST (create), PATCH (update), and DELETE (delete) data. By making fuller use of HTTP, RAPID is able to leverage HTTP Caching and other built-in mechanisms.

Interoperability

RAPID services can easily support GraphQL Clients through tools such as GraphQL Mesh. See our tutorial on building a GraphQL client to access our sample Jetsons service.