Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: segments structure has changed slightly #1184

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

IanKrieger
Copy link
Member

Resolves issue where segment names could not be retrieved


Screen Shot 2024-05-09 at 2 35 04 PM

@IanKrieger IanKrieger requested a review from a team as a code owner May 9, 2024 18:36
Copy link

github-actions bot commented May 9, 2024

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

Description

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

  • Update the Segment fragment to use the Segment type instead of SegmentsEntry
  • Update the Segments query to return code and name fields directly, instead of using the Segment fragment
  • Add an adSetCount field and adSets arguments to the Campaign type
  • Add an AdSetFilter input type to filter ad sets by name
  • Add an AFFILIATE enum value to CampaignType
  • Remove some unused fields from the OS and Segment types

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

@IanKrieger IanKrieger merged commit 380bdda into master May 9, 2024
8 checks passed
@IanKrieger IanKrieger deleted the fix/segment-picker branch May 9, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants