trim item search queries
This commit is contained in:
parent
fb8ccee797
commit
6f5e03da9c
1 changed files with 2 additions and 2 deletions
|
@ -310,7 +310,7 @@ const resolvers = {
|
||||||
return items;
|
return items;
|
||||||
},
|
},
|
||||||
itemSearch: async (_, { query }, { itemSearchLoader }) => {
|
itemSearch: async (_, { query }, { itemSearchLoader }) => {
|
||||||
const items = await itemSearchLoader.load(query);
|
const items = await itemSearchLoader.load(query.trim());
|
||||||
return { query, items };
|
return { query, items };
|
||||||
},
|
},
|
||||||
itemSearchToFit: async (
|
itemSearchToFit: async (
|
||||||
|
@ -321,7 +321,7 @@ const resolvers = {
|
||||||
const petType = await petTypeLoader.load({ speciesId, colorId });
|
const petType = await petTypeLoader.load({ speciesId, colorId });
|
||||||
const { bodyId } = petType;
|
const { bodyId } = petType;
|
||||||
const items = await itemSearchToFitLoader.load({
|
const items = await itemSearchToFitLoader.load({
|
||||||
query,
|
query: query.trim(),
|
||||||
bodyId,
|
bodyId,
|
||||||
offset,
|
offset,
|
||||||
limit,
|
limit,
|
||||||
|
|
Loading…
Reference in a new issue