Skip to content

Commit

Permalink
Modified: src/buildVariables.test.ts src/buildVariables.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnkr committed Sep 15, 2024
1 parent 3a77481 commit c1f8887
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/buildVariables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ describe(buildVariables.name, () => {
),
).toEqual({
filter: { id: { in: ['tag1', 'tag2'] } },
paging: {
limit: 2,
offset: 0,
},
});
});
});
Expand Down
3 changes: 3 additions & 0 deletions src/buildVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@ export default (introspectionResults: IntrospectionResult) =>
introspectionResults,
);

console.debug('preparedParams', preparedParams);

switch (raFetchMethod) {
case GET_LIST:
return getListVariables(resource, preparedParams);
case GET_MANY:
return {
filter: { id: { in: preparedParams.ids } },
paging: { limit: preparedParams.ids.length, offset: 0 },
};
case GET_MANY_REFERENCE:
let variables = getListVariables(resource, preparedParams);
Expand Down

0 comments on commit c1f8887

Please sign in to comment.