graphql-go / graphql-go/graphql
Have anyone got the plan for uploading file?
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 845
- PR merge metrics
- No merged PRs in 30d
Description
i can't find the method to upload file, i have saw the apollo upload examples, and i found the graphql-js is so different from graphql-go.
```go
var Upload = graphql.NewScalar(graphql.ScalarConfig{
Name: "Upload",
Description: "The `Upload` scalar type represents a file upload promise that resolves " +
"an object containing `stream`, `filename`, `mimetype` and `encoding`.",
Serialize: coerceFile,
ParseValue: coerceFile,
ParseLiteral: func(valueAST ast.Value) interface{} {
fmt.Println("wrong func")
return nil
},
})
func coerceFile(value interface{}) interface{} {
return value
}
```
i write the scalar for uploading, but i found it doesn't work well
Contributor guide
Assessment
This issue has not been assessed yet.