evenchange4 / graphql.macro

Compile GraphQL AST at build-time with babel-plugin-macros.
MIT License
239 stars 21 forks source link

Fix flow type for fragments #66

Closed mufasa71 closed 5 years ago

mufasa71 commented 5 years ago

Example:

// @flow
import { gql } from 'graphql.macro'
const PostFragment = gql`
  fragment Post on PostType {
    title,
    date
  }
`

const GET_POSTS = gql`
  query getPosts {
    ...PostFragment
  }

  ${PostFragment}
`

Produces: Cannot call gql because no more than 1 argument is expected by function

evenchange4 commented 5 years ago

Thanks for reporting the issue! Close it. Please feel free to reopen this issue if the problem still occurs with a newer version v1.3.4.