Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL spec version #13

Open
xzyfer opened this issue Dec 5, 2016 · 2 comments
Open

GraphQL spec version #13

xzyfer opened this issue Dec 5, 2016 · 2 comments

Comments

@xzyfer
Copy link

xzyfer commented Dec 5, 2016

It would be good to have some indication of what version of the GraphQL spec this implementation is currently aligned with. The current version is [email protected].

@atrniv
Copy link
Member

atrniv commented Jan 7, 2017

The spec version is a little outdated, it is an implementation of the October 2015 spec. I have been following the spec but most of the changes to it seem non-critical, and mainly in the validation rules which we are yet to implement. I will update the implementation once I have more time on my hands, however it is production ready as it stands today. We've been using it for over a year now internally.

@fungl164
Copy link

fungl164 commented Jan 4, 2019

Hi, Any update on this? Would love to know when an updated spec implementation will be addressed.

For example, to enable descriptions closer to the current spec the parser could be updated like this...

func (parser *Parser) description() (string, error) {
        text := ""
        isBody := false
        token := parser.lookahead
        for token.Type == STRING {
                text += strings.Trim(token.Val, " ")
                if isBody {
                        text += " "
                } else {
                        isBody = true
                }
                err := parser.match(STRING)
                if err != nil {
                        return text, err
                }
                token = parser.lookahead
        }
        return text, nil
}

Obviously, it doesn't handle multi-line strings but at least it recognizes single-line strings properly. Btw, as a side-effect, multiple single-line strings one after the other simulate a multi-line strings without any issues as well. Many Thnxs!

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

No branches or pull requests

3 participants