You want to publish a single GraphQL API in APIM. For inventory data, you already have a GraphQL backend and want APIM to proxy it. For orders, you only have REST endpoints and need to resolve GraphQL fields by calling those REST services and shaping the response. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a GraphQL API with passthrough to the upstream GraphQL service for inventory fields, and add GraphQL resolver policies for order fields that call REST backends and map responses to the schema..
Why this is the answer
The correct approach is to configure a GraphQL API in APIM. For the existing GraphQL backend (inventory), APIM can be set up for passthrough, directly forwarding requests to the upstream GraphQL service. For the order data, which only exists as REST endpoints, APIM's GraphQL resolver policies are the appropriate solution. These policies allow you to define how specific GraphQL fields are resolved. Within a resolver policy, you can make calls to your REST backends, retrieve the necessary data, and then transform (map) that data into the shape expected by your GraphQL schema before returning it to the client. This combines existing services under a single GraphQL endpoint without requiring a full rewrite of the REST services.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed