Skip to content

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