brave / ads-ui

Self-service ads UI
Mozilla Public License 2.0
23 stars 11 forks source link

chore(graphql): update mutation naming convention #1313

Closed IanKrieger closed 1 month ago

IanKrieger commented 1 month ago

Updating naming conventions to match other ads manager specific graphql mutations

github-actions[bot] commented 1 month ago

[puLL-Merge] - brave/ads-ui@1313

Description

This PR updates the GraphQL schema and related TypeScript types for the Brave ads-ui project. The changes mainly involve modifications to the advertiser-related mutations and types, as well as some removal of webhook-related fields and types.

Changes ### Changes 1. src/auth/components/AdvertiserDetailsForm.tsx: - Updated the `UpdateAdvertiser` mutation to use `AdsManagerUpdateAdvertiserInput` instead of `UpdateSelfServeAdvertiserInput`. - Changed the mutation name from `updateSelfServeAdvertiser` to `adsManagerUpdateAdvertiser`. 2. src/graphql-client/gql.ts: - Updated the GraphQL query string for the `UpdateAdvertiser` mutation to reflect the changes in the schema. - Updated the corresponding TypeScript types for the mutation. 3. src/graphql-client/graphql.ts: - Removed `webhooks` field from the `Ad` type. - Added `AdsManagerUpdateAdvertiserInput` type. - Added `ofacCompliant` field to the `Advertiser` type. - Removed `approveAdvertiser`, `rejectAdvertiser`, and `updateAd` mutations from the `Mutation` type. - Added `adsManagerUpdateAdvertiser` and `sendLoginEmail` mutations to the `Mutation` type. - Removed `Webhook` and `CreateWebhookInput` types. - Updated `UpdateAdvertiserInput` to include `ofacCompliant` field. 4. src/graphql/ads-serve.graphql.schema.json: - Updated the schema to reflect all the changes mentioned above.

Possible Issues

No major issues are apparent in this PR. However, it's important to note that these changes might require updates in other parts of the codebase that rely on the modified types and mutations.

Security Hotspots

There are no obvious security hotspots in this PR. However, the addition of the ofacCompliant field to the Advertiser type suggests that there might be some compliance-related changes. Ensure that this field is properly handled and that any related compliance checks are implemented correctly.