rmosolgo / language-graphql

GraphQL support for Atom text editor
MIT License
57 stars 13 forks source link

Unknown directive "connection" #15

Closed steida closed 7 years ago

steida commented 7 years ago

@connection(key: "Posts_allPosts") { invokes error "Unknown directive "connection""

export default createFragmentContainer(
  Posts,
  graphql`
    fragment Posts_viewer on Viewer {
      allPosts(first: $first, orderBy: createdAt_DESC)
        @connection(key: "Posts_allPosts") {
        edges {
          node {
            id
            ...Post_post
          }
        }
      }
      # To understand what's happening here:
      # Post_viewer fragment will be attached to viewer.__fragments for Post.js
      ...Post_viewer
    }
  `,
);
rmosolgo commented 7 years ago

Hi, I'm afraid I don't quite understand, could you take a screenshot of the error?

steida commented 7 years ago

screen shot 2017-08-18 at 02 41 53

steida commented 7 years ago

screen shot 2017-08-18 at 02 42 01

rmosolgo commented 7 years ago

Interesting! This library (language-graphql) does syntax highlighting, but not validation. Are you using another library for validation?

steida commented 7 years ago

I didn't install anything, but I just realized it could come from https://nuclide.io/docs/languages/graphql/ probably.

steida commented 7 years ago

Ok, closing for now.