Skip to content

Commit

Permalink
fix(webhook): fix type on createdAt
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Jan 9, 2024
1 parent 2c3e500 commit 5c8effa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/webhook/handlers/utils.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fragment CreateReferenceWordsReply on Reply {
reference
type
createdAt
}

fragment CreateReplyMessagesReply on Reply {
Expand All @@ -10,6 +11,7 @@ fragment CreateReplyMessagesReply on Reply {

fragment CreateReplyMessagesArticle on Article {
replyCount
createdAt
}

fragment CreateHighlightContentsHighlight on Highlights {
Expand Down
4 changes: 2 additions & 2 deletions typegen/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const documents = {
"\n query GetArticleInChoosingArticle($id: String!) {\n GetArticle(id: $id) {\n text\n replyCount\n articleType\n articleReplies(status: NORMAL) {\n reply {\n id\n type\n text\n }\n positiveFeedbackCount\n negativeFeedbackCount\n }\n createdAt\n }\n }\n ": types.GetArticleInChoosingArticleDocument,
"\n mutation SubmitReplyRequestWithoutReason($id: String!) {\n CreateOrUpdateReplyRequest(articleId: $id) {\n replyRequestCount\n }\n }\n ": types.SubmitReplyRequestWithoutReasonDocument,
"\n query GetReplyRelatedData($id: String!, $articleId: String!) {\n GetReply(id: $id) {\n type\n text\n reference\n createdAt\n }\n GetArticle(id: $articleId) {\n text\n replyCount\n createdAt\n }\n }\n ": types.GetReplyRelatedDataDocument,
"fragment CreateReferenceWordsReply on Reply {\n reference\n type\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}": types.CreateReferenceWordsReplyFragmentDoc,
"fragment CreateReferenceWordsReply on Reply {\n reference\n type\n createdAt\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n createdAt\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}": types.CreateReferenceWordsReplyFragmentDoc,
"\n mutation CreateAIReply($articleId: String!) {\n CreateAIReply(articleId: $articleId) {\n text\n createdAt\n }\n }\n ": types.CreateAiReplyDocument,
"\n query ListArticlesInInitState($text: String!) {\n ListArticles(\n filter: { moreLikeThis: { like: $text } }\n orderBy: [{ _score: DESC }]\n first: 4\n ) {\n edges {\n node {\n id\n text\n articleType\n attachmentUrl(variant: THUMBNAIL)\n }\n highlight {\n text\n hyperlinks {\n title\n summary\n }\n }\n }\n }\n }\n ": types.ListArticlesInInitStateDocument,
"\n query ListArticlesInProcessMedia($mediaUrl: String!) {\n ListArticles(\n filter: {\n mediaUrl: $mediaUrl\n articleTypes: [TEXT, IMAGE, AUDIO, VIDEO]\n transcript: { shouldCreate: true }\n }\n orderBy: [{ _score: DESC }]\n first: 9\n ) {\n edges {\n score\n mediaSimilarity\n node {\n id\n articleType\n attachmentUrl(variant: THUMBNAIL)\n }\n highlight {\n text\n hyperlinks {\n title\n summary\n }\n }\n }\n }\n }\n ": types.ListArticlesInProcessMediaDocument,
Expand Down Expand Up @@ -61,7 +61,7 @@ export function graphql(source: "\n query GetReplyRelatedData($id: String!, $
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "fragment CreateReferenceWordsReply on Reply {\n reference\n type\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}"): (typeof documents)["fragment CreateReferenceWordsReply on Reply {\n reference\n type\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}"];
export function graphql(source: "fragment CreateReferenceWordsReply on Reply {\n reference\n type\n createdAt\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n createdAt\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}"): (typeof documents)["fragment CreateReferenceWordsReply on Reply {\n reference\n type\n createdAt\n}\n\nfragment CreateReplyMessagesReply on Reply {\n text\n ...CreateReferenceWordsReply\n}\n\nfragment CreateReplyMessagesArticle on Article {\n replyCount\n createdAt\n}\n\nfragment CreateHighlightContentsHighlight on Highlights {\n text\n hyperlinks {\n title\n summary\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
12 changes: 6 additions & 6 deletions typegen/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,11 +1416,11 @@ export type GetReplyRelatedDataQueryVariables = Exact<{

export type GetReplyRelatedDataQuery = { GetReply: { type: ReplyTypeEnum, text: string | null, reference: string | null, createdAt: string } | null, GetArticle: { text: string | null, replyCount: number, createdAt: string } | null };

export type CreateReferenceWordsReplyFragment = { reference: string | null, type: ReplyTypeEnum };
export type CreateReferenceWordsReplyFragment = { reference: string | null, type: ReplyTypeEnum, createdAt: string };

export type CreateReplyMessagesReplyFragment = { text: string | null, reference: string | null, type: ReplyTypeEnum };
export type CreateReplyMessagesReplyFragment = { text: string | null, reference: string | null, type: ReplyTypeEnum, createdAt: string };

export type CreateReplyMessagesArticleFragment = { replyCount: number };
export type CreateReplyMessagesArticleFragment = { replyCount: number, createdAt: string };

export type CreateHighlightContentsHighlightFragment = { text: string | null, hyperlinks: Array<{ title: string | null, summary: string | null } | null> | null };

Expand All @@ -1445,9 +1445,9 @@ export type ListArticlesInProcessMediaQueryVariables = Exact<{

export type ListArticlesInProcessMediaQuery = { ListArticles: { edges: Array<{ score: number | null, mediaSimilarity: number, node: { id: string, articleType: ArticleTypeEnum, attachmentUrl: string | null }, highlight: { text: string | null, hyperlinks: Array<{ title: string | null, summary: string | null } | null> | null } | null }> } | null };

export const CreateReferenceWordsReplyFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReferenceWordsReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reference"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]} as unknown as DocumentNode<CreateReferenceWordsReplyFragment, unknown>;
export const CreateReplyMessagesReplyFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReplyMessagesReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CreateReferenceWordsReply"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReferenceWordsReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reference"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]} as unknown as DocumentNode<CreateReplyMessagesReplyFragment, unknown>;
export const CreateReplyMessagesArticleFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReplyMessagesArticle"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Article"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}}]} as unknown as DocumentNode<CreateReplyMessagesArticleFragment, unknown>;
export const CreateReferenceWordsReplyFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReferenceWordsReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reference"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode<CreateReferenceWordsReplyFragment, unknown>;
export const CreateReplyMessagesReplyFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReplyMessagesReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"CreateReferenceWordsReply"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReferenceWordsReply"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Reply"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reference"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode<CreateReplyMessagesReplyFragment, unknown>;
export const CreateReplyMessagesArticleFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateReplyMessagesArticle"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Article"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"replyCount"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode<CreateReplyMessagesArticleFragment, unknown>;
export const CreateHighlightContentsHighlightFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CreateHighlightContentsHighlight"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Highlights"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"hyperlinks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}}]}}]}}]} as unknown as DocumentNode<CreateHighlightContentsHighlightFragment, unknown>;
export const SubmitTextArticleUnderConsentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SubmitTextArticleUnderConsent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"text"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"CreateArticle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"text"},"value":{"kind":"Variable","name":{"kind":"Name","value":"text"}}},{"kind":"Argument","name":{"kind":"Name","value":"reference"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"type"},"value":{"kind":"EnumValue","value":"LINE"}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<SubmitTextArticleUnderConsentMutation, SubmitTextArticleUnderConsentMutationVariables>;
export const SubmitMediaArticleUnderConsentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SubmitMediaArticleUnderConsent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"mediaUrl"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"articleType"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ArticleTypeEnum"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"CreateMediaArticle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"mediaUrl"},"value":{"kind":"Variable","name":{"kind":"Name","value":"mediaUrl"}}},{"kind":"Argument","name":{"kind":"Name","value":"articleType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"articleType"}}},{"kind":"Argument","name":{"kind":"Name","value":"reference"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"type"},"value":{"kind":"EnumValue","value":"LINE"}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode<SubmitMediaArticleUnderConsentMutation, SubmitMediaArticleUnderConsentMutationVariables>;
Expand Down

0 comments on commit 5c8effa

Please sign in to comment.