Skip to content

Commit

Permalink
feat: switch to using simplified pricing api (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
tackley authored Jul 12, 2023
1 parent d258264 commit 0c2ed46
Show file tree
Hide file tree
Showing 10 changed files with 250 additions and 125 deletions.
5 changes: 5 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ const config: CodegenConfig = {
schema: "../ads-serve/src/graphql/schema.graphql",
documents: "./src/**/*.graphql",
hooks: { afterAllFileWrite: ["prettier --write"] },
config: {
scalars: {
Numeric: "string",
},
},
generates: {
"src/": {
preset: "near-operation-file",
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@mui/x-date-pickers": "5.0.20",
"axios": "1.4.0",
"base64url": "3.0.1",
"bignumber.js": "9.1.1",
"date-fns": "2.30.0",
"date-fns-tz": "2.0.0",
"formik": "2.4.1",
Expand Down
95 changes: 10 additions & 85 deletions src/graphql/ad-set.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions src/graphql/ad-set.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ fragment AdSet on AdSet {
fragment Ad on Ad {
id
state
prices {
amount
type
}
price
priceType
creative {
...Creative
}
Expand All @@ -50,12 +48,6 @@ mutation updateAdSet($updateAdSetInput: UpdateAdSetInput!) {
}
}

mutation createAd($createAdInput: CreateAdInput!) {
createAd(createAdInput: $createAdInput) {
...Ad
}
}

mutation updateAd($updateAdInput: UpdateAdInput!) {
updateCreativeInstanceState(updateAdInput: $updateAdInput) {
id
Expand Down
12 changes: 8 additions & 4 deletions src/graphql/campaign.generated.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/graphql/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0c2ed46

Please sign in to comment.