Add updatesSince API in GQL schema
This commit is contained in:
@ -1264,6 +1264,7 @@ export type Query = {
|
||||
sharedArticle: SharedArticleResult;
|
||||
subscriptions: SubscriptionsResult;
|
||||
typeaheadSearch: TypeaheadSearchResult;
|
||||
updatesSince: UpdatesSinceResult;
|
||||
user: UserResult;
|
||||
users: UsersResult;
|
||||
validateUsername: Scalars['Boolean'];
|
||||
@ -1341,6 +1342,13 @@ export type QueryTypeaheadSearchArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryUpdatesSinceArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
since: Scalars['Date'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryUserArgs = {
|
||||
userId?: InputMaybe<Scalars['ID']>;
|
||||
username?: InputMaybe<Scalars['String']>;
|
||||
@ -1892,6 +1900,14 @@ export type SubscriptionsSuccess = {
|
||||
subscriptions: Array<Subscription>;
|
||||
};
|
||||
|
||||
export type SyncUpdatedItemEdge = {
|
||||
__typename?: 'SyncUpdatedItemEdge';
|
||||
cursor: Scalars['String'];
|
||||
itemID: Scalars['ID'];
|
||||
node?: Maybe<SearchItem>;
|
||||
updateReason: UpdateReason;
|
||||
};
|
||||
|
||||
export type TypeaheadSearchError = {
|
||||
__typename?: 'TypeaheadSearchError';
|
||||
errorCodes: Array<TypeaheadSearchErrorCode>;
|
||||
@ -2059,6 +2075,12 @@ export type UpdatePageSuccess = {
|
||||
updatedPage: Article;
|
||||
};
|
||||
|
||||
export enum UpdateReason {
|
||||
Created = 'CREATED',
|
||||
Deleted = 'DELETED',
|
||||
Updated = 'UPDATED'
|
||||
}
|
||||
|
||||
export type UpdateReminderError = {
|
||||
__typename?: 'UpdateReminderError';
|
||||
errorCodes: Array<UpdateReminderErrorCode>;
|
||||
@ -2158,6 +2180,23 @@ export type UpdateUserSuccess = {
|
||||
user: User;
|
||||
};
|
||||
|
||||
export type UpdatesSinceError = {
|
||||
__typename?: 'UpdatesSinceError';
|
||||
errorCodes?: Maybe<Array<UpdatesSinceErrorCode>>;
|
||||
};
|
||||
|
||||
export enum UpdatesSinceErrorCode {
|
||||
Unauthorized = 'UNAUTHORIZED'
|
||||
}
|
||||
|
||||
export type UpdatesSinceResult = UpdatesSinceError | UpdatesSinceSuccess;
|
||||
|
||||
export type UpdatesSinceSuccess = {
|
||||
__typename?: 'UpdatesSinceSuccess';
|
||||
edges: Array<SyncUpdatedItemEdge>;
|
||||
pageInfo: PageInfo;
|
||||
};
|
||||
|
||||
export type UploadFileRequestError = {
|
||||
__typename?: 'UploadFileRequestError';
|
||||
errorCodes: Array<UploadFileRequestErrorCode>;
|
||||
@ -2653,6 +2692,7 @@ export type ResolversTypes = {
|
||||
SubscriptionsErrorCode: SubscriptionsErrorCode;
|
||||
SubscriptionsResult: ResolversTypes['SubscriptionsError'] | ResolversTypes['SubscriptionsSuccess'];
|
||||
SubscriptionsSuccess: ResolverTypeWrapper<SubscriptionsSuccess>;
|
||||
SyncUpdatedItemEdge: ResolverTypeWrapper<SyncUpdatedItemEdge>;
|
||||
TypeaheadSearchError: ResolverTypeWrapper<TypeaheadSearchError>;
|
||||
TypeaheadSearchErrorCode: TypeaheadSearchErrorCode;
|
||||
TypeaheadSearchItem: ResolverTypeWrapper<TypeaheadSearchItem>;
|
||||
@ -2687,6 +2727,7 @@ export type ResolversTypes = {
|
||||
UpdatePageInput: UpdatePageInput;
|
||||
UpdatePageResult: ResolversTypes['UpdatePageError'] | ResolversTypes['UpdatePageSuccess'];
|
||||
UpdatePageSuccess: ResolverTypeWrapper<UpdatePageSuccess>;
|
||||
UpdateReason: UpdateReason;
|
||||
UpdateReminderError: ResolverTypeWrapper<UpdateReminderError>;
|
||||
UpdateReminderErrorCode: UpdateReminderErrorCode;
|
||||
UpdateReminderInput: UpdateReminderInput;
|
||||
@ -2707,6 +2748,10 @@ export type ResolversTypes = {
|
||||
UpdateUserProfileSuccess: ResolverTypeWrapper<UpdateUserProfileSuccess>;
|
||||
UpdateUserResult: ResolversTypes['UpdateUserError'] | ResolversTypes['UpdateUserSuccess'];
|
||||
UpdateUserSuccess: ResolverTypeWrapper<UpdateUserSuccess>;
|
||||
UpdatesSinceError: ResolverTypeWrapper<UpdatesSinceError>;
|
||||
UpdatesSinceErrorCode: UpdatesSinceErrorCode;
|
||||
UpdatesSinceResult: ResolversTypes['UpdatesSinceError'] | ResolversTypes['UpdatesSinceSuccess'];
|
||||
UpdatesSinceSuccess: ResolverTypeWrapper<UpdatesSinceSuccess>;
|
||||
UploadFileRequestError: ResolverTypeWrapper<UploadFileRequestError>;
|
||||
UploadFileRequestErrorCode: UploadFileRequestErrorCode;
|
||||
UploadFileRequestInput: UploadFileRequestInput;
|
||||
@ -2950,6 +2995,7 @@ export type ResolversParentTypes = {
|
||||
SubscriptionsError: SubscriptionsError;
|
||||
SubscriptionsResult: ResolversParentTypes['SubscriptionsError'] | ResolversParentTypes['SubscriptionsSuccess'];
|
||||
SubscriptionsSuccess: SubscriptionsSuccess;
|
||||
SyncUpdatedItemEdge: SyncUpdatedItemEdge;
|
||||
TypeaheadSearchError: TypeaheadSearchError;
|
||||
TypeaheadSearchItem: TypeaheadSearchItem;
|
||||
TypeaheadSearchResult: ResolversParentTypes['TypeaheadSearchError'] | ResolversParentTypes['TypeaheadSearchSuccess'];
|
||||
@ -2993,6 +3039,9 @@ export type ResolversParentTypes = {
|
||||
UpdateUserProfileSuccess: UpdateUserProfileSuccess;
|
||||
UpdateUserResult: ResolversParentTypes['UpdateUserError'] | ResolversParentTypes['UpdateUserSuccess'];
|
||||
UpdateUserSuccess: UpdateUserSuccess;
|
||||
UpdatesSinceError: UpdatesSinceError;
|
||||
UpdatesSinceResult: ResolversParentTypes['UpdatesSinceError'] | ResolversParentTypes['UpdatesSinceSuccess'];
|
||||
UpdatesSinceSuccess: UpdatesSinceSuccess;
|
||||
UploadFileRequestError: UploadFileRequestError;
|
||||
UploadFileRequestInput: UploadFileRequestInput;
|
||||
UploadFileRequestResult: ResolversParentTypes['UploadFileRequestError'] | ResolversParentTypes['UploadFileRequestSuccess'];
|
||||
@ -3774,6 +3823,7 @@ export type QueryResolvers<ContextType = ResolverContext, ParentType extends Res
|
||||
sharedArticle?: Resolver<ResolversTypes['SharedArticleResult'], ParentType, ContextType, RequireFields<QuerySharedArticleArgs, 'slug' | 'username'>>;
|
||||
subscriptions?: Resolver<ResolversTypes['SubscriptionsResult'], ParentType, ContextType, Partial<QuerySubscriptionsArgs>>;
|
||||
typeaheadSearch?: Resolver<ResolversTypes['TypeaheadSearchResult'], ParentType, ContextType, RequireFields<QueryTypeaheadSearchArgs, 'query'>>;
|
||||
updatesSince?: Resolver<ResolversTypes['UpdatesSinceResult'], ParentType, ContextType, RequireFields<QueryUpdatesSinceArgs, 'since'>>;
|
||||
user?: Resolver<ResolversTypes['UserResult'], ParentType, ContextType, Partial<QueryUserArgs>>;
|
||||
users?: Resolver<ResolversTypes['UsersResult'], ParentType, ContextType>;
|
||||
validateUsername?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType, RequireFields<QueryValidateUsernameArgs, 'username'>>;
|
||||
@ -4116,6 +4166,14 @@ export type SubscriptionsSuccessResolvers<ContextType = ResolverContext, ParentT
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SyncUpdatedItemEdgeResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SyncUpdatedItemEdge'] = ResolversParentTypes['SyncUpdatedItemEdge']> = {
|
||||
cursor?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
||||
itemID?: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
||||
node?: Resolver<Maybe<ResolversTypes['SearchItem']>, ParentType, ContextType>;
|
||||
updateReason?: Resolver<ResolversTypes['UpdateReason'], ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type TypeaheadSearchErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['TypeaheadSearchError'] = ResolversParentTypes['TypeaheadSearchError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['TypeaheadSearchErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
@ -4279,6 +4337,21 @@ export type UpdateUserSuccessResolvers<ContextType = ResolverContext, ParentType
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type UpdatesSinceErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['UpdatesSinceError'] = ResolversParentTypes['UpdatesSinceError']> = {
|
||||
errorCodes?: Resolver<Maybe<Array<ResolversTypes['UpdatesSinceErrorCode']>>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type UpdatesSinceResultResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['UpdatesSinceResult'] = ResolversParentTypes['UpdatesSinceResult']> = {
|
||||
__resolveType: TypeResolveFn<'UpdatesSinceError' | 'UpdatesSinceSuccess', ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type UpdatesSinceSuccessResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['UpdatesSinceSuccess'] = ResolversParentTypes['UpdatesSinceSuccess']> = {
|
||||
edges?: Resolver<Array<ResolversTypes['SyncUpdatedItemEdge']>, ParentType, ContextType>;
|
||||
pageInfo?: Resolver<ResolversTypes['PageInfo'], ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type UploadFileRequestErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['UploadFileRequestError'] = ResolversParentTypes['UploadFileRequestError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['UploadFileRequestErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
@ -4571,6 +4644,7 @@ export type Resolvers<ContextType = ResolverContext> = {
|
||||
SubscriptionsError?: SubscriptionsErrorResolvers<ContextType>;
|
||||
SubscriptionsResult?: SubscriptionsResultResolvers<ContextType>;
|
||||
SubscriptionsSuccess?: SubscriptionsSuccessResolvers<ContextType>;
|
||||
SyncUpdatedItemEdge?: SyncUpdatedItemEdgeResolvers<ContextType>;
|
||||
TypeaheadSearchError?: TypeaheadSearchErrorResolvers<ContextType>;
|
||||
TypeaheadSearchItem?: TypeaheadSearchItemResolvers<ContextType>;
|
||||
TypeaheadSearchResult?: TypeaheadSearchResultResolvers<ContextType>;
|
||||
@ -4605,6 +4679,9 @@ export type Resolvers<ContextType = ResolverContext> = {
|
||||
UpdateUserProfileSuccess?: UpdateUserProfileSuccessResolvers<ContextType>;
|
||||
UpdateUserResult?: UpdateUserResultResolvers<ContextType>;
|
||||
UpdateUserSuccess?: UpdateUserSuccessResolvers<ContextType>;
|
||||
UpdatesSinceError?: UpdatesSinceErrorResolvers<ContextType>;
|
||||
UpdatesSinceResult?: UpdatesSinceResultResolvers<ContextType>;
|
||||
UpdatesSinceSuccess?: UpdatesSinceSuccessResolvers<ContextType>;
|
||||
UploadFileRequestError?: UploadFileRequestErrorResolvers<ContextType>;
|
||||
UploadFileRequestResult?: UploadFileRequestResultResolvers<ContextType>;
|
||||
UploadFileRequestSuccess?: UploadFileRequestSuccessResolvers<ContextType>;
|
||||
|
||||
@ -918,6 +918,7 @@ type Query {
|
||||
sharedArticle(selectedHighlightId: String, slug: String!, username: String!): SharedArticleResult!
|
||||
subscriptions(sort: SortParams): SubscriptionsResult!
|
||||
typeaheadSearch(first: Int, query: String!): TypeaheadSearchResult!
|
||||
updatesSince(after: String, first: Int, since: Date!): UpdatesSinceResult!
|
||||
user(userId: ID, username: String): UserResult!
|
||||
users: UsersResult!
|
||||
validateUsername(username: String!): Boolean!
|
||||
@ -1419,6 +1420,13 @@ type SubscriptionsSuccess {
|
||||
subscriptions: [Subscription!]!
|
||||
}
|
||||
|
||||
type SyncUpdatedItemEdge {
|
||||
cursor: String!
|
||||
itemID: ID!
|
||||
node: SearchItem
|
||||
updateReason: UpdateReason!
|
||||
}
|
||||
|
||||
type TypeaheadSearchError {
|
||||
errorCodes: [TypeaheadSearchErrorCode!]!
|
||||
}
|
||||
@ -1571,6 +1579,12 @@ type UpdatePageSuccess {
|
||||
updatedPage: Article!
|
||||
}
|
||||
|
||||
enum UpdateReason {
|
||||
CREATED
|
||||
DELETED
|
||||
UPDATED
|
||||
}
|
||||
|
||||
type UpdateReminderError {
|
||||
errorCodes: [UpdateReminderErrorCode!]!
|
||||
}
|
||||
@ -1662,6 +1676,21 @@ type UpdateUserSuccess {
|
||||
user: User!
|
||||
}
|
||||
|
||||
type UpdatesSinceError {
|
||||
errorCodes: [UpdatesSinceErrorCode!]
|
||||
}
|
||||
|
||||
enum UpdatesSinceErrorCode {
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
union UpdatesSinceResult = UpdatesSinceError | UpdatesSinceSuccess
|
||||
|
||||
type UpdatesSinceSuccess {
|
||||
edges: [SyncUpdatedItemEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type UploadFileRequestError {
|
||||
errorCodes: [UploadFileRequestErrorCode!]!
|
||||
}
|
||||
|
||||
@ -1761,6 +1761,34 @@ const schema = gql`
|
||||
siteName: String
|
||||
}
|
||||
|
||||
union UpdatesSinceResult = UpdatesSinceSuccess | UpdatesSinceError
|
||||
|
||||
type UpdatesSinceSuccess {
|
||||
edges: [SyncUpdatedItemEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type SyncUpdatedItemEdge {
|
||||
cursor: String!
|
||||
updateReason: UpdateReason!
|
||||
itemID: ID!
|
||||
node: SearchItem # for created or updated items, null for deletions */
|
||||
}
|
||||
|
||||
enum UpdateReason {
|
||||
CREATED
|
||||
UPDATED
|
||||
DELETED
|
||||
}
|
||||
|
||||
type UpdatesSinceError {
|
||||
errorCodes: [UpdatesSinceErrorCode!]
|
||||
}
|
||||
|
||||
enum UpdatesSinceErrorCode {
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
# Mutations
|
||||
type Mutation {
|
||||
googleLogin(input: GoogleLoginInput!): LoginResult!
|
||||
@ -1873,6 +1901,7 @@ const schema = gql`
|
||||
webhook(id: ID!): WebhookResult!
|
||||
apiKeys: ApiKeysResult!
|
||||
typeaheadSearch(query: String!, first: Int): TypeaheadSearchResult!
|
||||
updatesSince(after: String, first: Int, since: Date!): UpdatesSinceResult!
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user