Skip to content

Add graphql support for taxonomy - #42

Merged
adithyasamavedhi-ttd merged 2 commits into
mainfrom
add-graphql-support-for-taxonomy
Sep 9, 2026
Merged

adithyasamavedhi-ttd merged 2 commits into
mainfrom
add-graphql-support-for-taxonomy

Conversation

@adithyasamavedhi-ttd

@adithyasamavedhi-ttd adithyasamavedhi-ttd commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What does this MR do:

  • Adds graphQL support for the taxonomy GraphQL operations

REST → GraphQL → SDK mapping

REST endpoint What it does GraphQL operation ttd-data SDK function
POST /v3/thirdpartydata Create third-party taxonomy segments mutation thirdPartyDataUpsert(input: [ThirdPartyDataUpsertInput!]!)ThirdPartyDataUpsertResults client.third_party_taxonomy.upsert_segments(...) — 1–1000 SegmentInput per call
PUT /v3/thirdpartydata Update existing segments Same mutation — the server returns mode: CREATE | UPDATE per segment client.third_party_taxonomy.upsert_segments(...) — omit a key to leave that field unchanged
POST /v3/thirdpartydata/query Look up segments for a provider, optionally filtered by element ID thirdPartyDataProvider(id).thirdPartyTargetingDataSegments(where: {providerElementId: {in: [...]}}, first, after) client.third_party_taxonomy.query_segments(...)
GET /v3/thirdpartydata/status/{providerId}/{providerElementId} Read a single segment's taxonomy approval status Same connection, where: {providerElementId: {eq: ...}}, selecting taxonomyApprovalStatus client.third_party_taxonomy.query_segment_taxonomy_status(...)
  • Add support to execute custom graphql queries if the user comes up with the query
  • Adds a scirpt to validate the graphql documents against the schema using instrospction ( currently runs on-demand)
  • Adds a example script to run graphql operations for testing

Tests:

  1. Query Segments:
Screenshot 2026-08-25 at 3 12 07 PM Screenshot 2026-08-25 at 3 00 58 PM 1
  1. Query Segments next page:
Screenshot 2026-08-25 at 3 11 42 PM Screenshot 2026-08-25 at 3 09 15 PM
  1. Create Segments:
Screenshot 2026-08-25 at 3 10 40 PM Screenshot 2026-08-25 at 2 56 59 PM
  1. Get Taxonomy Approval Status:
Screenshot 2026-08-25 at 3 12 36 PM Screenshot 2026-08-25 at 2 59 06 PM 1

@adithyasamavedhi-ttd
adithyasamavedhi-ttd requested a review from a team August 21, 2026 17:25
@adithyasamavedhi-ttd
adithyasamavedhi-ttd force-pushed the add-graphql-support-for-taxonomy branch 9 times, most recently from 0ba6244 to 5f9f0b3 Compare August 25, 2026 23:45
Comment thread examples/graphql_example.py Outdated
GraphQL taxonomy operations (upsert_segments, upsert_segment,
query_segments, query_segment_taxonomy_status) via a typed GraphQL client
on DataClient, validated offline against the Impala subgraph SDL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@adithyasamavedhi-ttd
adithyasamavedhi-ttd force-pushed the add-graphql-support-for-taxonomy branch 2 times, most recently from b4046d7 to 7500d44 Compare September 3, 2026 22:35
@adithyasamavedhi-ttd
adithyasamavedhi-ttd force-pushed the add-graphql-support-for-taxonomy branch from 7500d44 to 05f7add Compare September 8, 2026 21:48
@adithyasamavedhi-ttd
adithyasamavedhi-ttd merged commit 15ed9e2 into main Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants