diff --git a/graphql.schema.json b/graphql.schema.json index 5a4baa4..2106cfc 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -1284,13 +1284,9 @@ "name": "hasFixedRate", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "defaultValue": null }, @@ -5782,7 +5778,7 @@ }, { "name": "lockCargoBikeById", - "description": "lock cargoBike - not implemented", + "description": "lock cargoBike returns true if bike is not locked or if it doesnt exist", "args": [ { "name": "id", @@ -5873,6 +5869,37 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lockEquipmentById", + "description": "lock equipment returns true if bike is not locked or if it doesnt exist", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updateEquipment", "description": "update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation", diff --git a/src/app/graphqlOperations/fragments/bikeFragment.graphql b/src/app/graphqlOperations/fragments/bikeFragment.graphql index 846fc8c..aa22522 100644 --- a/src/app/graphqlOperations/fragments/bikeFragment.graphql +++ b/src/app/graphqlOperations/fragments/bikeFragment.graphql @@ -6,6 +6,8 @@ fragment CargoBikeFieldsMutable on CargoBike { billing hasFixedRate } + lockedBy + lockedUntil dimensionsAndLoad { bikeLength bikeWeight diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 9ed8576..3bfd8d7 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -174,7 +174,7 @@ export type InsuranceDataUpdateInput = { maintananceResponsible?: Maybe; maintananceBenefactor?: Maybe; maintananceAgreement?: Maybe; - hasFixedRate: Scalars['Boolean']; + hasFixedRate?: Maybe; fixedRate?: Maybe; /** Projektzuschuss */ projectAllowance?: Maybe; @@ -767,12 +767,14 @@ export type Mutation = { __typename?: 'Mutation'; /** creates new cargoBike and returns cargobike with new ID */ createCargoBike: CargoBike; - /** lock cargoBike - not implemented */ + /** lock cargoBike returns true if bike is not locked or if it doesnt exist */ lockCargoBikeById: Scalars['Boolean']; /** updates cargoBike of given ID with supplied fields and returns updated cargoBike */ updateCargoBike: CargoBike; /** creates new peace of unique Equipment */ createEquipment: Equipment; + /** lock equipment returns true if bike is not locked or if it doesnt exist */ + lockEquipmentById: Scalars['Boolean']; /** update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation */ updateEquipment: Equipment; /** creates new lendingStation and returns lendingStation with new ID */ @@ -813,6 +815,11 @@ export type MutationCreateEquipmentArgs = { }; +export type MutationLockEquipmentByIdArgs = { + id: Scalars['ID']; +}; + + export type MutationUpdateEquipmentArgs = { equipment: EquipmentUpdateInput; }; @@ -902,7 +909,7 @@ export type GetCargoBikesQuery = ( export type CargoBikeFieldsMutableFragment = ( { __typename?: 'CargoBike' } - & Pick + & Pick & { insuranceData: ( { __typename?: 'InsuranceData' } & Pick @@ -933,6 +940,8 @@ export const CargoBikeFieldsMutableFragmentDoc = gql` billing hasFixedRate } + lockedBy + lockedUntil dimensionsAndLoad { bikeLength bikeWeight