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

Pass travis build #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmarks/benchmarks.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package graphql
7 changes: 3 additions & 4 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"strings"
//"log"

"sync"

. "github.com/playlyfe/go-graphql/language"
"github.com/playlyfe/go-graphql/utils"
"sync"
)

type ResolveParams struct {
Expand Down Expand Up @@ -112,7 +113,6 @@ func (executor *Executor) resolveNamedType(ntype ASTNode) *NamedType {
return unmodifiedType.(*NamedType)
}
}
return nil
}

// TODO: Implement type printer
Expand Down Expand Up @@ -190,10 +190,10 @@ func (executor *Executor) variableValue(context interface{}, ntype ASTNode, inpu
}
} else {
value, err := executor.variableValue(context, ttype.Type, input)
result = append(result, value)
if err != nil {
return nil, err
}
result = append(result, value)
}
return result, nil
}
Expand Down Expand Up @@ -1284,7 +1284,6 @@ func (executor *Executor) completeValue(reqCtx *RequestContext, objectType *Obje
Field: field,
}
}
return nil, nil
}

func (executor *Executor) resolveFieldOnObject(reqCtx *RequestContext, objectType *ObjectTypeDefinition, object interface{}, fieldType ASTNode, firstField *Field) (interface{}, error) {
Expand Down
5 changes: 3 additions & 2 deletions executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/json"
"errors"
"fmt"
"testing"

. "github.com/playlyfe/go-graphql/language"
. "github.com/smartystreets/goconvey/convey"
"testing"
)

type Author struct {
Expand All @@ -16,7 +17,7 @@ type Author struct {
Author *Author `json:"author"`
Title string `json:"title"`
Body string `json:"body"`
keywords []interface{} `json:"keywords"`
Keywords []interface{} `json:"keywords"`
RecentArticle *Article `json:"recentArticle"`
}

Expand Down
3 changes: 0 additions & 3 deletions language/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,6 @@ func LexText(lexer *Lexer) StateFn {
return lexer.Errorf(`GraphQL Syntax Error (%d:%d) Invalid character "%s" found in document`, lexer.Line, lexer.Column-1, lexer.runeToString(rn))
}
}
lexer.Emit(EOF)
return nil
}

func LexNumber(lexer *Lexer) StateFn {
Expand Down Expand Up @@ -433,7 +431,6 @@ func LexComment(lexer *Lexer) StateFn {
return LexText
}
}
return LexText
}

func LexQuote(lexer *Lexer) StateFn {
Expand Down