Skip to content

MEITREX/dinodev_gropius_adapter

Repository files navigation

Gropius Adapter for DinoDev

This repository contains the adapter that connects DinoDev to Gropius.

Quality Gate Status Maintainability Rating

GraphQL Code Generator

Like all other DinoDev repos, the adapter uses the GraphQL Code Generator Plugin to generate Java classes from the GraphQL schema. In this case, the schema is the Gropius schema and the generated classes are used to interact with the Gropius API.

The plugin is configured in the build.gradle file. The classes are generated on every build, so you don't need to run the generator manually.

Updating the Gropius Schema

To update the Gropius Schema, you can run the gradle task refreshGropiusSchema. The URL of the Gropius backend can be adjusted in the build.gradle file.

Limitations of generated client classes

The advantage of using the generated classes is that you can use them to interact with the Gropius API in a type-safe way. However, the generated classes are not perfect and there are some limitations:

  • To few fields are generated if the field has parameters. In this case, add the type name to fieldsWithoutResolvers in the build.gradle file.
  • There are serialization issues with OffsetDateTime and LocalDateTime. The workaround is to use String fields instead. This can be achieved using a customTypeMapping in the build.gradle file.
  • Serialization of interfaces is not supported. If interfaces are queried, manually map them to a concrete subclass in the customTypeMapping.`

About

Connection to Gropius for DinoDev

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages