November 2017 Archives

graphql-perl - plugin to make GraphQL "just work" with OpenAPI

The just-released v0.03 of GraphQL::Plugin::Convert::OpenAPI provides a plugin to convert a given OpenAPI specification (the spec formerly known as Swagger) to a GraphQL schema.

There is also now a sample OpenAPI applet for Mojolicious::Lite. It provides a GraphQL interface to the superb CPAN Testers REST API. Here is an example query:

  v3_report_get(id: "a35ce723-6bf8-1014-858b-1fdf904…

graphql-perl - plugin to make GraphQL "just work" with DBIx::Class

As mentioned in the LPW "trailer" for shiny new toys, I will be giving a talk on graphql-perl. I promised to talk about introspecting a DBIx::Class schema to make a GraphQL interface. This is how!

The API for a "convert plugin" for graphql-perl is simple: implement a to_graphql, and optionally a from_graphql method. The to_graphql returns a hash-ref with three keys:


About Mohawk

user-pic I blog about Perl.