Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Expense tags #17

wants to merge 1 commit into from

Conversation

aryamantodkar
Copy link

No description provided.

const tagResolvers = {
Query: {
tags: (root, {}, { v1AccessToken, v2AccessToken, dataSources }) => {
return { expensetags };
Copy link
Member

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 = [
Copy link
Member

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 }) => {
Copy link
Member

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;
    },
  },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants