This page documents the complete GraphQL schema exposed by the FTGO GraphQL API Gateway. The schema is defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/microservices-patterns/ftgo-application/llms.txt
Use this file to discover all available pages before exploring further.
ftgo-api-gateway-graphql/src/schema.js using graphql-tools. Every query and mutation listed here is available at the /graphql endpoint.
Full schema
Queries
orders
Returns all orders placed by a given consumer. Each order’s consumer, restaurant, and deliveryInfo fields are resolved lazily — they are only fetched from their respective backend services when the client includes them in the query.
Arguments
The numeric ID of the consumer whose orders to retrieve.
Return type
Returns[Order] — a list of Order objects.
Example
order
Returns a single order by its ID.
Arguments
The numeric ID of the order to retrieve.
Return type
Returns a single Order object, ornull if not found.
Example
consumer
Returns a single consumer by ID. The orders field on the returned Consumer is resolved by calling the Order History Service when requested.
Arguments
The numeric ID of the consumer to retrieve.
Return type
Returns a single Consumer object, ornull if not found.
Example
Mutations
createConsumer
Creates a new consumer in the Consumer Service and returns the created record.
Arguments
Consumer name details. See ConsumerInfo for fields.
Return type
Returns the newly created Consumer object. Theorders field on the returned object is an empty list.
Example
Types
Order
Represents a single order placed through the FTGO application. Theconsumer, restaurant, and deliveryInfo fields are resolved via API composition: each triggers a call to the relevant downstream service.
Unique identifier for the order.
The numeric ID of the consumer who placed the order.
The consumer who placed this order. Resolved by calling the Consumer Service using the order’s
consumerId.The restaurant that received this order. Resolved by calling the Restaurant Service using the order’s
restaurantId.Current delivery status and courier assignment. Resolved by calling the Delivery Service using the order’s
orderId.Consumer
Represents a customer registered in the FTGO Consumer Service.Unique identifier for the consumer.
Consumer’s first name.
Consumer’s last name.
All orders placed by this consumer. If the
Consumer was returned as part of an orders query the list may already be populated; otherwise it is fetched from the Order History Service.Restaurant
Represents a restaurant registered in the FTGO Restaurant Service.Unique identifier for the restaurant.
Display name of the restaurant.
DeliveryInfo
Represents the current delivery state of an order, returned by the Delivery Service.Current delivery status. One of the DeliveryStatus enum values.
Estimated delivery time, in minutes from order placement.
Name or identifier of the courier assigned to this order.
null if no courier has been assigned yet.ConsumerInfo (input)
Input type used when creating a new consumer via thecreateConsumer mutation.
Consumer’s first name.
Consumer’s last name.
Enums
DeliveryStatus
Represents the lifecycle of an order’s delivery.| Value | Description |
|---|---|
PREPARING | The restaurant is preparing the order. |
READY_FOR_PICKUP | The order is ready and waiting for a courier. |
PICKED_UP | A courier has picked up the order. |
DELIVERED | The order has been delivered to the consumer. |
The
deliveryInfo field on Order is resolved via a separate Delivery Service. If that service is unavailable, the deliveryInfo field resolves to null rather than causing the entire query to fail.