hongbo-miao/hongbomiao.com

View on GitHub
api-go/internal/graphql_server/schemas/debounced_seed.go

Summary

Maintainability
A
0 mins
Test Coverage
package schemas

import (
    "github.com/graphql-go/graphql"
    "github.com/hongbo-miao/hongbomiao.com/api-go/internal/graphql_server/utils"
)

var debouncedSeedGraphQLType = graphql.NewObject(graphql.ObjectConfig{
    Name: "DebouncedSeed",
    Fields: graphql.Fields{
        "seedNumber": &graphql.Field{
            Type: graphql.Int,
        },
    },
})

var debouncedSeedGraphQLField = graphql.Field{
    Type: debouncedSeedGraphQLType,
    Resolve: func(p graphql.ResolveParams) (interface{}, error) {
        return utils.GetDebouncedSeed()
    },
}