GraphQLize Update (#1) - Pagination, Scalar Types, Scala & Kotlin Support

Author, GraphQLize

Hello World,

Thank you, everyone, for the words of praise and encouragement during the announcement of GraphQLize two weeks ago. I am glad to see 100+ ⭐️s in GitHub. is my first-ever OSS project which achieved this tiny milestone. The journey just began, and a long way to go!

I am working on a biweekly iteration and as planned completed by the first iteration of GraphQLize. In this blog post, I am going to share what's new in GraphQLize and what is in the pipeline for the next iteration.

Pagination via offset and limit

Using offset and limit parameters to paginate data is one of the most widely used techniques for pagination. GraphQLize supports these parameters to paginate the table or view queries.

For a table like below,

CREATE TABLE actor (
actor_id SERIAL PRIMARY KEY,
first_name character varying(45) NOT NULL,
last_name character varying(45) NOT NULL
);

GraphQLize provides out of the box GraphQL API with pagination supported via offset and limit, and we can query the actor table like below

query {
actors(limit: 2, offset: 2) {
actorId
firstName
lastName
}
}

The JSON result for the above query would look like

{
"data": {
"actors": [
{
"actorId": 3,
"firstName": "ED",
"lastName": "CHASE"
},
{
"actorId": 4,
"firstName": "JENNIFER",
"lastName": "DAVIS"
}
]
}
}

Pagination of nested objects

GraphQLize also supports pagination of nested objects.

One to Many Relationships

query {
countryByCountryId(countryId: 6) {
country
cities(limit: 2, offset : 4) {
city
}
}
}

Many to Many Relationships

query {
actorByActorId(actorId: 1) {
firstName
films(limit: 5, offset: 5) {
title
}
}
}

Custom Scalar Types

The latest release of GraphQLize adds supports for the following custom scalar types in addition to the standard GraphQL scalar types.

Refer the respective documentation to more the about the database column types that these scalar types map to.

Scala & Kotlin Support

One of the core design goals of GraphQLize is not to tie to any web development framework and remain as a drop-in library in any JVM language projects.

Here is the new documentation of how to use GraphQLize in Scala & Kotlin.

note

I am looking for some help on creating a sample web application using Play framework in Scala. If you'd look like to contribute, feel free to create a pull request. Thanks in advance :)

What's Next?

There are close to that I am planning for the v1.0 (production-ready) release. For the next iteration, I am planning to work on the below ones.

If you are wondering why only four, I am developing GraphQLize in addition to my day job (and lockdown), and I don't want to commit more and deliver less :)

You can keep track of the progress by

  • Following the
  • Joining
  • Subscribing to

⭐️ If you like GraphQLize, give it a star on ! ⭐️

That's all!

Cheers,
Tamizh