What is GraphQL?
GraphQL is a query language for API’s and a runtime for fulfilling those queries with existing data. GraphQL provides a complete and understandable description of your API's data, giving clients the power to ask for exactly what they need and nothing more. When sending queries to your API, GraphQL returns a very predictable result, without any over-fetching or under-fetching, ensuring that apps using GraphQL are fast, stable, and scalable.
Integrating IBM App Connect with GraphQL
IBM App Connect simplifies the process of building flows that integrate with GraphQL and other applications.
The GraphQL connector when uploaded, is displayed with the name the user provides on the App Connect User Interface (UI) with the default GraphQL icon. This integration allows you to perform operations with the imported GraphQL connector and other business applications.
For detailed information about using App Connect with imported GraphQL APIs, see How to use IBM App Connect with imported GraphQL APIs on the IBM documentation webpage.
Supported operations with GraphQL Connector
The objects can be dependent on the GraphQL schema that you are using. You can use App Connect to perform actions on these objects. The operations supported for the GraphQL schema objects will be modeled into the operations in App Connect.
Objects |
Supported operations |
Comments |
Basic GraphQL connector objects |
Create, Retrieve, Update, Delete, and other operations |
Operations like create, update, delete, and retrieve all are performed on the object as per the support in the GraphQL schema.
|
Custom GraphQL query object |
Custom GraphQL queries and mutations can be run independently of the object |
You will be able to execute the custom queries and see the response in the StepZen server. This allows running custom queries and mutations, providing the flexibility to fetch or modify data beyond the predefined operations in the schema. |
Use case: Connecting Star Wars database with StepZen (IBM API Connect Essentials)
Customers can use StepZen's powerful introspection capabilities to create GraphQL APIs for their data sources. The StepZen SDL, which specifies the GraphQL schema, can be imported into the App Connect Designer to create a connector, enabling smooth interaction with the StepZen GraphQL API endpoint.
How it works
The data source we are using here is a database for Star Wars. Star Wars is a highly influential and popular science fiction franchise created by George Lucas. If Star Wars were represented as a database schema, the entities would encapsulate the major elements of the universe, such as Planets, Starships, Species, Events, Droids, weapons, and so on.