Skip to content

Commit

Permalink
Changed user to users
Browse files Browse the repository at this point in the history
  • Loading branch information
Atharva-Kanherkar committed Apr 18, 2024
1 parent 2fbb7a1 commit b2d0e8d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ type AgendaItem {
updatedAt: Date!
updatedBy: User!
urls: [String]
user: String!
users: [User]
}

type AgendaSection {
Expand Down Expand Up @@ -297,7 +297,7 @@ input CreateAgendaItemInput {
sequence: Int!
title: String!
urls: [String]
user: String
users: [ID]
}

input CreateAgendaSectionInput {
Expand Down Expand Up @@ -1619,7 +1619,7 @@ input UpdateAgendaItemInput {
title: String
updatedBy: ID!
urls: [String]
user: String
users: [ID]
}

input UpdateAgendaSectionInput {
Expand Down
11 changes: 7 additions & 4 deletions src/models/AgendaItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface InterfaceAgendaItem {
createdBy: PopulatedDoc<InterfaceUser & Document>; // Reference to the user who created the agenda item.
updatedBy: PopulatedDoc<InterfaceUser & Document>; // Reference to the user who last updated the agenda item.
urls?: string[]; // Optional array of URLs related to the agenda item.
user?: string; // Optional user associated with the agenda item.
users?: PopulatedDoc<InterfaceUser & Document>[]; // Optional users array indicating key note users for the agenda item.
relatedEvent: PopulatedDoc<InterfaceEvent & Document>; // Reference to the event associated with the agenda item.
categories?: PopulatedDoc<InterfaceAgendaCategory & Document>[]; // Optional array of agenda categories associated with the agenda item.
sequence: number; // Sequence number of the agenda item.
Expand Down Expand Up @@ -85,9 +85,12 @@ export const AgendaItemSchema = new Schema({
urls: {
type: [String],
},
user: {
type: String,
},
users: [
{
type: Schema.Types.ObjectId,
ref: "User",
},
],
categories: [
{
type: Schema.Types.ObjectId,
Expand Down
4 changes: 2 additions & 2 deletions src/typeDefs/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const inputs = gql`
attachments: [String]
relatedEventId: ID
urls: [String]
user: String
users: [ID]
categories: [ID]
sequence: Int!
itemType: ItemType!
Expand All @@ -69,7 +69,7 @@ export const inputs = gql`
relatedEvent: ID
updatedBy: ID!
urls: [String]
user: String
users: [ID]
categories: [ID]
sequence: Int
itemType: ItemType
Expand Down
2 changes: 1 addition & 1 deletion src/typeDefs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const types = gql`
createdBy: User!
updatedBy: User!
urls: [String]
user: String!
users: [User]
categories: [AgendaCategory]
sequence: Int!
itemType: ItemType!
Expand Down
8 changes: 4 additions & 4 deletions src/types/generatedGraphQLTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export type AgendaItem = {
updatedAt: Scalars['Date']['output'];
updatedBy: User;
urls?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
user: Scalars['String']['output'];
users?: Maybe<Array<Maybe<User>>>;
};

export type AgendaSection = {
Expand Down Expand Up @@ -373,7 +373,7 @@ export type CreateAgendaItemInput = {
sequence: Scalars['Int']['input'];
title: Scalars['String']['input'];
urls?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
user?: InputMaybe<Scalars['String']['input']>;
users?: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
};

export type CreateAgendaSectionInput = {
Expand Down Expand Up @@ -2661,7 +2661,7 @@ export type UpdateAgendaItemInput = {
title?: InputMaybe<Scalars['String']['input']>;
updatedBy: Scalars['ID']['input'];
urls?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
user?: InputMaybe<Scalars['String']['input']>;
users?: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
};

export type UpdateAgendaSectionInput = {
Expand Down Expand Up @@ -3629,7 +3629,7 @@ export type AgendaItemResolvers<ContextType = any, ParentType extends ResolversP
updatedAt?: Resolver<ResolversTypes['Date'], ParentType, ContextType>;
updatedBy?: Resolver<ResolversTypes['User'], ParentType, ContextType>;
urls?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>;
user?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
users?: Resolver<Maybe<Array<Maybe<ResolversTypes['User']>>>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

Expand Down

0 comments on commit b2d0e8d

Please sign in to comment.