Skip to content

Commit

Permalink
Merge pull request #324 from cofacts/nullable-createdat
Browse files Browse the repository at this point in the history
Nullable createdat
  • Loading branch information
MrOrz committed Oct 26, 2023
2 parents 3a215c4 + 5636d7a commit 4b00d58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/graphql/models/Article.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ const Article = new GraphQLObjectType({
fields: () => ({
id: { type: new GraphQLNonNull(GraphQLID) },
text: { type: GraphQLString },
createdAt: { type: new GraphQLNonNull(GraphQLString) },
createdAt: {
type: GraphQLString,
description: 'May be null for legacy articles',
},
updatedAt: { type: GraphQLString },
status: { type: new GraphQLNonNull(ReplyRequestStatusEnum) },
references: { type: new GraphQLList(ArticleReference) },
Expand Down
5 changes: 4 additions & 1 deletion src/graphql/models/ArticleReply.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ export default new GraphQLObjectType({
resolve: ({ status }) => (status === undefined ? 'NORMAL' : status),
},

createdAt: { type: new GraphQLNonNull(GraphQLString) },
createdAt: {
type: GraphQLString,
description: 'May be null for legacy article-replies',
},
updatedAt: { type: GraphQLString },
}),
});
5 changes: 4 additions & 1 deletion src/graphql/models/Reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const Reply = new GraphQLObjectType({
description: 'The user submitted this reply version',
resolve: userFieldResolver,
},
createdAt: { type: new GraphQLNonNull(GraphQLString) },
createdAt: {
type: GraphQLString,
description: 'May be null for legacy replies',
},
text: { type: GraphQLString },
type: { type: new GraphQLNonNull(ReplyTypeEnum) },
reference: { type: GraphQLString },
Expand Down

0 comments on commit 4b00d58

Please sign in to comment.