Skip to content

Commit

Permalink
remove getUserTagAncestors query
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Nov 1, 2024
1 parent 093c5a2 commit 428fc28
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 124 deletions.
1 change: 0 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,6 @@ type Query {
getPledgesByUserId(orderBy: PledgeOrderByInput, userId: ID!, where: PledgeWhereInput): [FundraisingCampaignPledge]
getPlugins: [Plugin]
getUserTag(id: ID!): UserTag
getUserTagAncestors(id: ID!): [UserTag]
getVenueByOrgId(first: Int, orderBy: VenueOrderByInput, orgId: ID!, skip: Int, where: VenueWhereInput): [Venue]
getlanguage(lang_code: String!): [Translation]
hasSubmittedFeedback(eventId: ID!, userId: ID!): Boolean
Expand Down
45 changes: 0 additions & 45 deletions src/resolvers/Query/getUserTagAncestors.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/resolvers/Query/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { getPledgesByUserId } from "./getPledgesByUserId";
import { getPlugins } from "./getPlugins";
import { getlanguage } from "./getlanguage";
import { getUserTag } from "./getUserTag";
import { getUserTagAncestors } from "./getUserTagAncestors";
import { me } from "./me";
import { myLanguage } from "./myLanguage";
import { organizations } from "./organizations";
Expand Down Expand Up @@ -81,7 +80,6 @@ export const Query: QueryResolvers = {
getlanguage,
getPlugins,
getUserTag,
getUserTagAncestors,
isSampleOrganization,
me,
myLanguage,
Expand Down
2 changes: 0 additions & 2 deletions src/typeDefs/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ export const queries = gql`
getUserTag(id: ID!): UserTag
getUserTagAncestors(id: ID!): [UserTag]
getAllNotesForAgendaItem(agendaItemId: ID!): [Note]
advertisementsConnection(
Expand Down
7 changes: 0 additions & 7 deletions src/types/generatedGraphQLTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,6 @@ export type Query = {
getPledgesByUserId?: Maybe<Array<Maybe<FundraisingCampaignPledge>>>;
getPlugins?: Maybe<Array<Maybe<Plugin>>>;
getUserTag?: Maybe<UserTag>;
getUserTagAncestors?: Maybe<Array<Maybe<UserTag>>>;
getVenueByOrgId?: Maybe<Array<Maybe<Venue>>>;
getlanguage?: Maybe<Array<Maybe<Translation>>>;
hasSubmittedFeedback?: Maybe<Scalars['Boolean']['output']>;
Expand Down Expand Up @@ -2478,11 +2477,6 @@ export type QueryGetUserTagArgs = {
};


export type QueryGetUserTagAncestorsArgs = {
id: Scalars['ID']['input'];
};


export type QueryGetVenueByOrgIdArgs = {
first?: InputMaybe<Scalars['Int']['input']>;
orderBy?: InputMaybe<VenueOrderByInput>;
Expand Down Expand Up @@ -4581,7 +4575,6 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent
getPledgesByUserId?: Resolver<Maybe<Array<Maybe<ResolversTypes['FundraisingCampaignPledge']>>>, ParentType, ContextType, RequireFields<QueryGetPledgesByUserIdArgs, 'userId'>>;
getPlugins?: Resolver<Maybe<Array<Maybe<ResolversTypes['Plugin']>>>, ParentType, ContextType>;
getUserTag?: Resolver<Maybe<ResolversTypes['UserTag']>, ParentType, ContextType, RequireFields<QueryGetUserTagArgs, 'id'>>;
getUserTagAncestors?: Resolver<Maybe<Array<Maybe<ResolversTypes['UserTag']>>>, ParentType, ContextType, RequireFields<QueryGetUserTagAncestorsArgs, 'id'>>;
getVenueByOrgId?: Resolver<Maybe<Array<Maybe<ResolversTypes['Venue']>>>, ParentType, ContextType, RequireFields<QueryGetVenueByOrgIdArgs, 'orgId'>>;
getlanguage?: Resolver<Maybe<Array<Maybe<ResolversTypes['Translation']>>>, ParentType, ContextType, RequireFields<QueryGetlanguageArgs, 'lang_code'>>;
hasSubmittedFeedback?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType, RequireFields<QueryHasSubmittedFeedbackArgs, 'eventId' | 'userId'>>;
Expand Down
6 changes: 3 additions & 3 deletions tests/resolvers/Query/getUserTag.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ afterAll(async () => {
await disconnect(MONGOOSE_INSTANCE);
});

describe("resolvers -> Query -> getUserTagAncestors", () => {
describe("resolvers -> Query -> getUserTag", () => {
it(`throws NotFoundError if no userTag exists with _id === args.id`, async () => {
const { requestContext } = await import("../../../src/libraries");

Expand All @@ -49,8 +49,8 @@ describe("resolvers -> Query -> getUserTagAncestors", () => {
id: testTag?._id.toString() ?? "",
};

const getUserTagAncestorsPayload = await getUserTagResolver?.({}, args, {});
const getUserTagPayload = await getUserTagResolver?.({}, args, {});

expect(getUserTagAncestorsPayload).toEqual(testTag);
expect(getUserTagPayload).toEqual(testTag);
});
});
64 changes: 0 additions & 64 deletions tests/resolvers/Query/getUserTagAncestors.spec.ts

This file was deleted.

0 comments on commit 428fc28

Please sign in to comment.