mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add highlightsCount to the searchItem graphql type
This commit is contained in:
parent
6c86ee9f3c
commit
de62dcfe43
4 changed files with 5 additions and 0 deletions
|
|
@ -3146,6 +3146,7 @@ export type SearchItem = {
|
|||
folder: Scalars['String'];
|
||||
format?: Maybe<Scalars['String']>;
|
||||
highlights?: Maybe<Array<Highlight>>;
|
||||
highlightsCount?: Maybe<Scalars['Int']>;
|
||||
id: Scalars['ID'];
|
||||
image?: Maybe<Scalars['String']>;
|
||||
isArchived: Scalars['Boolean'];
|
||||
|
|
@ -7481,6 +7482,7 @@ export type SearchItemResolvers<ContextType = ResolverContext, ParentType extend
|
|||
folder?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
||||
format?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
||||
highlights?: Resolver<Maybe<Array<ResolversTypes['Highlight']>>, ParentType, ContextType>;
|
||||
highlightsCount?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
|
||||
id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
||||
image?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
||||
isArchived?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
|
||||
|
|
|
|||
|
|
@ -2415,6 +2415,7 @@ type SearchItem {
|
|||
folder: String!
|
||||
format: String
|
||||
highlights: [Highlight!]
|
||||
highlightsCount: Int
|
||||
id: ID!
|
||||
image: String
|
||||
isArchived: Boolean!
|
||||
|
|
|
|||
|
|
@ -585,6 +585,7 @@ export const functionResolvers = {
|
|||
},
|
||||
isArchived: (item: LibraryItem) => !!item.archivedAt,
|
||||
pageType: (item: LibraryItem) => item.itemType,
|
||||
highlightsCount: (item: LibraryItem) => item.highlightAnnotations?.length,
|
||||
...readingProgressHandlers,
|
||||
},
|
||||
Subscription: {
|
||||
|
|
|
|||
|
|
@ -1680,6 +1680,7 @@ const schema = gql`
|
|||
format: String
|
||||
score: Float
|
||||
seenAt: Date
|
||||
highlightsCount: Int
|
||||
}
|
||||
|
||||
type SearchItemEdge {
|
||||
|
|
|
|||
Loading…
Reference in a new issue