# Configuration Resolver

### Configuration

**File Name**: `configuration.js`&#x20;

**File Path**: `lyoneat-multivendor-api/graphql/resolvers/configuration.js`&#x20;

This Resolver is used for saving configurations mainly used by web dashboard. It contains getting configuration saving order configuration, saving email configuration, saving MongoDb configuration, Uploading token, saving Paypal configuration, saving stripe configuration and saving delivery configuration.

### configuration

* **GraphQL Type**: Query
* **Input Type or Parameters**: NULL
* **Description**: Gets all the existing configuration.
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### saveOrderConfiguration

* **GraphQL Type**: Query
* **Input Type or Parameters** OrderConfigurationInput!

| Name              | Type   | Required |
| ----------------- | ------ | -------- |
| order\_id\_prefix | String | true     |

* **Description**: Sets the prefix for order id.
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### saveEmailConfiguration

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** EmailConfigurationInput!

| **Name**      | **Type** | **Required** |
| ------------- | -------- | ------------ |
| email         | String   | true         |
| password      | String   | true         |
| enable\_email | String   | true         |

* **Description**: Configuration is made for email input enabled\_email true or false is for use case if unnecessary sending emails are not required mainly in test environment.&#x20;
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### saveMongoConfiguration

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** MongoConfigurationInput!

| **Name**     | **Type** | **Required** |
| ------------ | -------- | ------------ |
| mongodb\_url | String   | true         |

* **Description**: Saves MonoDb connection string url.
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### uploadToken

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** String!

| **Name**  | **Type** | **Required** |
| --------- | -------- | ------------ |
| pushToken | String   | true         |

* **Description**: Saves the pushToken String for configuring push notifications.
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### savePaypalConfiguration

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** PaypalConfigurationInput!

| **Name**       | **Type** | **Required** |
| -------------- | -------- | ------------ |
| client\_id     | String   | true         |
| client\_secret | String   | true         |
| sandbox        | Boolean  | true         |

* **Description**: Saves Configuration for Paypal
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### saveStripeConfiguration

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** StripeConfigurationInput!

| **Name**         | **Type** | **Required** |
| ---------------- | -------- | ------------ |
| publishable\_key | String   | true         |
| secret\_key      | String   | true         |

* **Description**: Saves configuration for Stripe
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |

### saveDeliveryConfiguration

* **GraphQL Type**: Mutation
* **Input Type or Parameters:** DeliveryConfigurationInput!

| **Name**          | **Type** | **Required** |
| ----------------- | -------- | ------------ |
| delivery\_charges | Float    | true         |

* **Description**: Saves the charges for delivery.
* **Response Input Type or Response:** Configuration!

| Name              | Type    |
| ----------------- | ------- |
| \_id              | String  |
| order\_id\_prefix | String  |
| push\_token       | String  |
| mongodb\_url      | String  |
| email             | String  |
| password          | String  |
| enable\_email     | Boolean |
| client\_id        | String  |
| client\_secret    | String  |
| sandbox           | Boolean |
| publishable\_key  | String  |
| secret\_key       | String  |
| delivery\_charges | Float   |
