From f344f74d8810c6f860c5040c9a96c87d36e7fc34 Mon Sep 17 00:00:00 2001 From: Alexandre Monjol Date: Thu, 7 Mar 2024 09:16:39 +0100 Subject: [PATCH] mics(graph) change type name --- .../types/billable_metric_filters/input.rb | 1 + schema.graphql | 20 ++-- schema.json | 106 +++++++++--------- .../billable_metrics/create_input_spec.rb | 2 +- .../billable_metrics/update_input_spec.rb | 2 +- 5 files changed, 66 insertions(+), 65 deletions(-) diff --git a/app/graphql/types/billable_metric_filters/input.rb b/app/graphql/types/billable_metric_filters/input.rb index fbffb1fa62e..014623c6fd3 100644 --- a/app/graphql/types/billable_metric_filters/input.rb +++ b/app/graphql/types/billable_metric_filters/input.rb @@ -3,6 +3,7 @@ module Types module BillableMetricFilters class Input < BaseInputObject + graphql_name 'BillableMetricFiltersInput' description 'Billable metric filters input arguments' argument :key, String, required: true diff --git a/schema.graphql b/schema.graphql index fb261106acb..3d3573aac8f 100644 --- a/schema.graphql +++ b/schema.graphql @@ -193,6 +193,14 @@ type BillableMetricFilter { values: [String!]! } +""" +Billable metric filters input arguments +""" +input BillableMetricFiltersInput { + key: String! + values: [String!]! +} + enum BillingTimeEnum { anniversary calendar @@ -1689,7 +1697,7 @@ input CreateBillableMetricInput { code: String! description: String! fieldName: String - filters: [Input!] + filters: [BillableMetricFiltersInput!] group: JSON name: String! recurring: Boolean @@ -3363,14 +3371,6 @@ An ISO 8601-encoded datetime """ scalar ISO8601DateTime -""" -Billable metric filters input arguments -""" -input Input { - key: String! - values: [String!]! -} - type Invite { acceptedAt: ISO8601DateTime! email: String! @@ -5870,7 +5870,7 @@ input UpdateBillableMetricInput { code: String! description: String! fieldName: String - filters: [Input!] + filters: [BillableMetricFiltersInput!] group: JSON id: String! name: String! diff --git a/schema.json b/schema.json index 743c7cdd4ec..e2162a8b113 100644 --- a/schema.json +++ b/schema.json @@ -1858,6 +1858,57 @@ "inputFields": null, "enumValues": null }, + { + "kind": "INPUT_OBJECT", + "name": "BillableMetricFiltersInput", + "description": "Billable metric filters input arguments", + "interfaces": null, + "possibleTypes": null, + "fields": null, + "inputFields": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "enumValues": null + }, { "kind": "ENUM", "name": "BillingTimeEnum", @@ -5838,7 +5889,7 @@ "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "Input", + "name": "BillableMetricFiltersInput", "ofType": null } } @@ -14669,57 +14720,6 @@ "inputFields": null, "enumValues": null }, - { - "kind": "INPUT_OBJECT", - "name": "Input", - "description": "Billable metric filters input arguments", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "key", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "values", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "enumValues": null - }, { "kind": "SCALAR", "name": "Int", @@ -26487,7 +26487,7 @@ "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "Input", + "name": "BillableMetricFiltersInput", "ofType": null } } diff --git a/spec/graphql/types/billable_metrics/create_input_spec.rb b/spec/graphql/types/billable_metrics/create_input_spec.rb index ea325ad99d5..b69bc352857 100644 --- a/spec/graphql/types/billable_metrics/create_input_spec.rb +++ b/spec/graphql/types/billable_metrics/create_input_spec.rb @@ -12,6 +12,6 @@ it { is_expected.to accept_argument(:name).of_type('String!') } it { is_expected.to accept_argument(:recurring).of_type('Boolean') } it { is_expected.to accept_argument(:weighted_interval).of_type('WeightedIntervalEnum') } - it { is_expected.to accept_argument(:filters).of_type('[Input!]') } + it { is_expected.to accept_argument(:filters).of_type('[BillableMetricFiltersInput!]') } it { is_expected.to accept_argument(:group).of_type('JSON') } end diff --git a/spec/graphql/types/billable_metrics/update_input_spec.rb b/spec/graphql/types/billable_metrics/update_input_spec.rb index 2700903e174..31711c90a42 100644 --- a/spec/graphql/types/billable_metrics/update_input_spec.rb +++ b/spec/graphql/types/billable_metrics/update_input_spec.rb @@ -13,6 +13,6 @@ it { is_expected.to accept_argument(:name).of_type('String!') } it { is_expected.to accept_argument(:recurring).of_type('Boolean') } it { is_expected.to accept_argument(:weighted_interval).of_type('WeightedIntervalEnum') } - it { is_expected.to accept_argument(:filters).of_type('[Input!]') } + it { is_expected.to accept_argument(:filters).of_type('[BillableMetricFiltersInput!]') } it { is_expected.to accept_argument(:group).of_type('JSON') } end