Skip to content

Add apollo support #28

@Mayank1791989

Description

@Mayank1791989

From @gaoxiaoliangz on June 2, 2017 11:31

When writing graphql queries, I often have to import external gql files and use them as fragments, like so:

const withData = graphql(gql`
  query queryBooks($id: ID!) {
    book(id: $id) {
      ...BookInfo
    }
  }
  ${BOOK_INFO}
`, {
    options: (props) => {
      return {
        variables: {
          id: props.params.id
        }
      }
    }
  })

but the plugin give me '[graphql] Syntax Error: Unexpected $' error. I know it seems to be an error for the plugin, but in the real world, it works fine, so how to disable that line of linting so it would not produce errors like that?

Copied from original issue: kumarharsh/graphql-for-vscode#31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions