-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expense tags #17
base: main
Are you sure you want to change the base?
Expense tags #17
Conversation
const tagResolvers = { | ||
Query: { | ||
tags: (root, {}, { v1AccessToken, v2AccessToken, dataSources }) => { | ||
return { expensetags }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the curly bracket to fix the error you are getting as the schema expects an array to be returned
@@ -0,0 +1,84 @@ | |||
const expensetags = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file from here and add to MSW. GraphQL should only return real data
|
||
const tagResolvers = { | ||
Query: { | ||
tags: (root, {}, { v1AccessToken, v2AccessToken, dataSources }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a call to the REST api to get tags
const tagResolvers = {
Query: {
tags: async (root, {}, { v1AccessToken, v2AccessToken, dataSources }) => {
const tags = await dataSources.walloraAPI.getTags(
v1AccessToken,
v2AccessToken
);
return tags;
},
},
};
No description provided.