Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilbe27 committed Feb 5, 2024
1 parent 37743c1 commit bae559b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
9 changes: 4 additions & 5 deletions src/gql/heart-monitor/heart-monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ import {
defaultTask,
QueryMarketingArgs,
MarketingFields,
MutationMarketingArgs,
GQLMarketingMutation,
GQLMarketingMutationGqlUpdateTwitterUserArgs,
GQLTwitterUser,
} from ".."

Expand Down Expand Up @@ -437,7 +436,7 @@ test("markPriceCandlesSubscription", async () => {
})

const testMarketingMutation = async (
args: MutationMarketingArgs,
args: GQLMarketingMutationGqlUpdateTwitterUserArgs,
fields?: GQLTwitterUser
) => {
const resp = await heartMonitor.marketingMutation(args, {}, fields)
Expand Down Expand Up @@ -467,9 +466,9 @@ const testMarketingMutation = async (
}

// Create JIT JWT for this test
test.skip("marketinMutation", async () => {
test.skip("marketingMutation", async () => {
await testMarketingMutation({
updateTwitterUser: {
input: {
id: "800528778854182912",
nibiAddress: "nibi1p6luzkxeufy29reymgjqnl5mv6a6gae07cphed",
},
Expand Down
6 changes: 3 additions & 3 deletions src/gql/heart-monitor/heart-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import {
MarketingFields,
QueryMarketingArgs,
marketingQuery,
MutationMarketingArgs,
GQLMarketingMutationGqlUpdateTwitterUserArgs,
marketingMutation,
GqlOutMarketingMutation,
GQLTwitterUser,
Expand Down Expand Up @@ -153,7 +153,7 @@ export interface IHeartMonitor {
) => Promise<GqlOutInflation>

readonly marketingMutation: (
args: Partial<MutationMarketingArgs>,
args: Partial<GQLMarketingMutationGqlUpdateTwitterUserArgs>,
headers: HeadersInit,
fields?: Partial<GQLTwitterUser>
) => Promise<GqlOutMarketingMutation>
Expand Down Expand Up @@ -337,7 +337,7 @@ export class HeartMonitor implements IHeartMonitor {
) => marketingQuery(args, this.gqlEndpt, fields)

marketingMutation = async (
args: Partial<MutationMarketingArgs>,
args: Partial<GQLMarketingMutationGqlUpdateTwitterUserArgs>,
headers: HeadersInit,
fields?: Partial<GQLTwitterUser>
) => marketingMutation(args, this.gqlEndpt, headers, fields)
Expand Down
12 changes: 4 additions & 8 deletions src/gql/mutation/marketing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,25 @@ import {
convertObjectToPropertiesString,
doGqlQuery,
gqlQuery,
GQLUpdateTwitterUserInput,
GQLMutation,
GQLTwitterUser,
GQLMarketingMutationGqlUpdateTwitterUserArgs,
} from ".."

export type MutationMarketingArgs = {
updateTwitterUser: GQLUpdateTwitterUserInput
}

export interface GqlOutMarketingMutation {
marketing?: GQLMutation["marketing"]
}

export const marketingMutationString = (
args: Partial<MutationMarketingArgs>,
args: Partial<GQLMarketingMutationGqlUpdateTwitterUserArgs>,
excludeParentObject: boolean,
fields?: Partial<GQLTwitterUser>
) =>
`mutation {
marketing {
${gqlQuery(
"updateTwitterUser",
args.updateTwitterUser ?? {},
args,
fields
? convertObjectToPropertiesString(fields)
: convertObjectToPropertiesString(defaultTwitterUser),
Expand All @@ -35,7 +31,7 @@ export const marketingMutationString = (
}`

export const marketingMutation = async (
args: Partial<MutationMarketingArgs>,
args: Partial<GQLMarketingMutationGqlUpdateTwitterUserArgs>,
endpt: string,
headers: HeadersInit,
fields?: Partial<GQLTwitterUser>
Expand Down

0 comments on commit bae559b

Please sign in to comment.