change size to first in query param
This commit is contained in:
@ -1353,8 +1353,8 @@ export type QuerySubscriptionsArgs = {
|
||||
|
||||
|
||||
export type QueryTypeaheadSearchArgs = {
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
query: Scalars['String'];
|
||||
size?: InputMaybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -924,7 +924,7 @@ type Query {
|
||||
sendInstallInstructions: SendInstallInstructionsResult!
|
||||
sharedArticle(selectedHighlightId: String, slug: String!, username: String!): SharedArticleResult!
|
||||
subscriptions(sort: SortParams): SubscriptionsResult!
|
||||
typeaheadSearch(query: String!, size: Int): TypeaheadSearchResult!
|
||||
typeaheadSearch(first: Int, query: String!): TypeaheadSearchResult!
|
||||
user(userId: ID, username: String): UserResult!
|
||||
users: UsersResult!
|
||||
validateUsername(username: String!): Boolean!
|
||||
|
||||
@ -899,7 +899,7 @@ export const typeaheadSearchResolver = authorized<
|
||||
TypeaheadSearchSuccess,
|
||||
TypeaheadSearchError,
|
||||
QueryTypeaheadSearchArgs
|
||||
>(async (_obj, { query, size }, { claims }) => {
|
||||
>(async (_obj, { query, first }, { claims }) => {
|
||||
if (!claims?.uid) {
|
||||
return { errorCodes: [TypeaheadSearchErrorCode.Unauthorized] }
|
||||
}
|
||||
@ -910,9 +910,9 @@ export const typeaheadSearchResolver = authorized<
|
||||
properties: {
|
||||
env: env.server.apiEnv,
|
||||
query,
|
||||
size,
|
||||
first,
|
||||
},
|
||||
})
|
||||
|
||||
return { items: await searchAsYouType(claims.uid, query, size || undefined) }
|
||||
return { items: await searchAsYouType(claims.uid, query, first || undefined) }
|
||||
})
|
||||
|
||||
@ -1896,7 +1896,7 @@ const schema = gql`
|
||||
webhooks: WebhooksResult!
|
||||
webhook(id: ID!): WebhookResult!
|
||||
apiKeys: ApiKeysResult!
|
||||
typeaheadSearch(query: String!, size: Int): TypeaheadSearchResult!
|
||||
typeaheadSearch(query: String!, first: Int): TypeaheadSearchResult!
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user