Order Resolver
Last updated
Last updated
File Name: order.js
File Path: enatega-multivendor-api/graphql/resolvers/order.js
This Resolver is used to handle all order related queries. For example getting a single order, getting all orders of the user, getting all order in the database, placing an order, editing an order, canceling an order, updating order status, giving rating and review to an order, getting all reviews of the user.
GraphQL Type: Query
Input Type or Parameters: String!
Description: Gets the order for particular id
Response Input Type or Response: Order!
GraphQL Type: Query
Input Type or Parameters: NULL
Description: Gets the order of particular user
Response Input Type or Response: [Order!]!
GraphQL Type: Query
Input Type or Parameters: NULL
Description: Gets the orders of all Users.
Response Input Type or Response: [Order!]!
GraphQL Type: Mutation
Input Type or Parameters: [OrderInput!]!, paymentMethod:String
Description: Gets all the orders of a particular User
Response Input Type or Response: Order!
GraphQL Type: Mutation
Input Type or Parameters: _id:String! and [OrderInput!]!
Description: Edits Order of particular _id with given OrderInput parameters
Response Input Type or Response: Order!
GraphQL Type: Mutation
Input Type or Parameters: OrderId:String!
Description: Sets the order status to cancel
Response Input Type or Response: Order!
GraphQL Type: Mutation
Input Type or Parameters: orderId:String! and status:String!
Description: Changes the status of the order done from admin panel which sends a push notification to mobile app
Response Input Type or Response: Order!
GraphQL Type: Mutation
Input Type or Parameters: reviewInput!
Description: Gives review to a order
Response Input Type or Response: Review!
GraphQL Type: Query
Input Type or Parameters: NULL
Description: Gets all the reviews of the user
Response Input Type or Response: [ReviewOutput!]!
Name
Type
Required
id
String
true
Name
Type
_id
ID
order_id
String!
delivery_address
String!
items
[Item!]!
user
User!
payment_method
String
paid_amount
Float
payment_status
String!
order_status
String!
review
Review
status_queue
OrderStatus
is_active
Boolean!
Name
Type
_id
ID
order_id
String!
delivery_address
String!
items
[Item!]!
user
User!
payment_method
String
paid_amount
Float
payment_status
String!
order_status
String!
review
Review
status_queue
OrderStatus
is_active
Boolean!
Name
Type
_id
ID
order_id
String!
delivery_address
String!
items
[Item!]!
user
User!
payment_method
String
paid_amount
Float
payment_status
String!
order_status