VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor

Home Page:http://vulcanjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax Errors on Fragments

Neobii opened this issue · comments

The error messages in defining fragments is not clear.

registerFragment(`
  fragment HandlePartiesBadge on HandleParty {
    _id
    createdAt
    isMod
    party {
      ...HandlePartyBadge
    
  }
`);

Will get you this error:
Error: Subfragment “HandlePartiesBadge” of fragment “HandleBadge” has not been initialized yet.

The error messages should be able to report syntax errors in fragments.

Looks like fragment processing is hard coded using regular expressions. Any one got any better ideas on how to do this?