Upcoming: ManageIQ GraphQL API


#1

Hello, ManageIQ users/developers!

We’ve learned a ton over the last couple years about how users interact with our current REST API, and we’ve been doing a lot of talking in Gitter about the next step for API integrations with ManageIQ. You also might have seen a lot of conversation about GraphQL, too. It’s true!

We’re pleased to share with the community that the platform team at Red Hat is developing a new GraphQL API planned for release in ManageIQ Hammer.

This new API will provide an interface that more closely matches the exact sort of API calls that ManageIQ integrators want - predictable responses for complex queries as well as things that benefit both consumers and server developers alike: type safety and introspection with generated documentation and API clients. It also allows us to build a more organic interface to the data you want, without sweating the details of the underlying ManageIQ implementation.

The project is built as most of our other major components are - as a Rails engine mounted in to ManageIQ core. The engine is at https://github.com/ManageIQ/manageiq-graphql and is now a part of ManageIQ’s master branch (targeted for the ManageIQ Hammer release).

We’ll be sharing much more about this project and GraphQL in the coming months. In the meantime, there’s a plethora of resources just a web search away about GraphQL and it’s features, if you’re interested. Here’s just a few:

Thanks!
@chrisarcand and @imtayadeway

FAQ

Can I use the GraphQL API right now?
The project is considered alpha and may currently change it’s interface at any time without warning. We’ll let everyone know when the API has stabilized enough to start using it without fear of major changes.

What about the REST API?
The REST API will continue to be supported and features added to for the foreseeable future. This API is not intended to be a complete replacement for the REST API in the Hammer release.


#2

thanks! where could we track the available data and mutation we can consume via graphql? it would be interesting to see if we can already leverage it for some of the data we fetch via the UI instead of hard coded json in a rails view or typical rest calls?


#3

@ohadlevy The best way to track what’s available currently is via the documentation explorer in GraphiQL, available at /graphql/explorer on ManageIQ’s master branch (you run the probject from source yourself, as it’s not released yet!):

In the future, there will be full documentation (which will include the schema docs above) available for each release of ManageIQ on manageiq.org