Skip to content

Commit

Permalink
Merge pull request #308 from NibiruChain/develop
Browse files Browse the repository at this point in the history
fix: trying again
  • Loading branch information
cgilbe27 authored Feb 5, 2024
2 parents 7d195e9 + 83db669 commit e896844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
9 changes: 2 additions & 7 deletions src/gql/mutation/marketing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ export const marketingMutationString = (
export const marketingMutation = async (
args: Partial<MutationMarketingArgs>,
endpt: string,
authorizationHeader: HeadersInit,
headers: HeadersInit,
fields?: Partial<GQLTwitterUser>
): Promise<GqlOutMarketingMutation> =>
doGqlQuery(
marketingMutationString(args, true, fields),
endpt,
authorizationHeader,
true
)
doGqlQuery(marketingMutationString(args, true, fields), endpt, headers)
7 changes: 2 additions & 5 deletions src/gql/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,12 @@ export const gqlQuery = <T>(
export const doGqlQuery = async <T>(
gqlQuery: string,
gqlEndpt: string,
headers?: HeadersInit,
isMutation?: boolean
headers?: HeadersInit
) => {
const rawResp = await fetch(gqlEndpt, {
method: "POST",
headers: { "Content-Type": "application/json", ...headers },
body: JSON.stringify(
isMutation ? { mutation: gqlQuery } : { query: gqlQuery }
),
body: JSON.stringify({ query: gqlQuery }),
})
return cleanResponse(rawResp) as T
}

1 comment on commit e896844

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 93%
94.62% (1197/1265) 87.82% (541/616) 88.03% (309/351)

Please sign in to comment.