diff --git a/dataconnect/connector/vendor/mutations.gql b/dataconnect/connector/vendor/mutations.gql index 82b66686..c40b1119 100644 --- a/dataconnect/connector/vendor/mutations.gql +++ b/dataconnect/connector/vendor/mutations.gql @@ -19,3 +19,34 @@ mutation CreateVendor( } ) } + +mutation UpdateVendor( + $id: UUID!, + $vendorNumber: String, + $legalName: String, + $region: VendorRegion, + $platformType: VendorPlatformType, + $primaryContactEmail: String, + $approvalStatus: VendorApprovalStatus, + $isActive: Boolean +) @auth(level: USER) { + vendor_update( + id: $id, + data: { + vendorNumber: $vendorNumber + legalName: $legalName + region: $region + platformType: $platformType + primaryContactEmail: $primaryContactEmail + approvalStatus: $approvalStatus + isActive: $isActive + } + ) +} + +mutation DeleteVendor( + $id: UUID! +) @auth(level: USER) { + vendor_delete(id: $id) +} + diff --git a/dataconnect/connector/vendor/queries.gql b/dataconnect/connector/vendor/queries.gql index 8247d508..996fd91b 100644 --- a/dataconnect/connector/vendor/queries.gql +++ b/dataconnect/connector/vendor/queries.gql @@ -10,3 +10,33 @@ query listVendor @auth(level: USER) { isActive } } + +query getVendorById( + $id: UUID! +) @auth(level: USER) { + vendor(id: $id) { + id + vendorNumber + legalName + region + platformType + primaryContactEmail + approvalStatus + isActive + } +} + +query filterVendors( + $where: Vendor_bool_exp! +) @auth(level: USER) { + vendors(where: $where) { + id + vendorNumber + legalName + region + platformType + primaryContactEmail + approvalStatus + isActive + } +} \ No newline at end of file