brave / ads-ui

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

fix: segments structure has changed slightly #1184

Closed IanKrieger closed 3 months ago

IanKrieger commented 3 months ago

Resolves issue where segment names could not be retrieved


Screen Shot 2024-05-09 at 2 35 04 PM
github-actions[bot] commented 3 months ago

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

Description

This PR updates the GraphQL schema and types related to segments and campaigns. The main changes are:

The motivation seems to be to clean up the schema and add some new functionality around ad sets and campaign types.

Changes ### Changes common.graphql: - Update `Segment` fragment to use `Segment` type - Update `Segments` query to return segment fields directly gql.ts: - Update `graphql` function to handle updated `Segment` fragment - Update `graphql` function to handle updated `Segments` query graphql.ts: - Update generated GraphQL types based on schema changes - `Segment` type now extends `SegmentsEntry` - Add `adSetCount` and `adSets` fields to `Campaign` - Add `AdSetFilter` input type - Add `AFFILIATE` to `CampaignType` enum - Remove id/createdAt/modifiedAt from `OS` type - Remove id/createdAt/modifiedAt and add name/code to `Segment` type