File server.go
has 9187 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package resolvers
import (
executionContext
has 298 methods (exceeds 20 allowed). Consider refactoring. Open
type executionContext struct {
*graphql.OperationContext
*executableSchema
deferred int32
pendingDeferred int32
Method executableSchema.Complexity
has a Cognitive Complexity of 173 (exceeds 20 allowed). Consider refactoring. Open
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
_ = ec
switch typeName + "." + field {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executableSchema.Complexity
has 417 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
_ = ec
switch typeName + "." + field {
Method executionContext._Transaction
has a Cognitive Complexity of 97 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext._Query
has a Cognitive Complexity of 95 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext._Query
has 328 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
Method executionContext._Log
has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext._Receipt
has a Cognitive Complexity of 88 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executableSchema.Complexity
has 87 return statements (exceeds 4 allowed). Open
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
ec := executionContext{nil, e, 0, 0, nil}
_ = ec
switch typeName + "." + field {
Method executionContext._Transaction
has 190 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Receipt
has 175 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Log
has 173 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Query
has 58 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
Method executionContext.field_Query_logsRange_args
has 111 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.field_Query_logsAtHeadRange_args
has 102 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.field_Query_logsRange_args
has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_receiptsRange_args
has 93 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receiptsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext.field_Query_receiptsAtHeadRange_args
has 93 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receiptsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext.field_Query_logsAtHeadRange_args
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_logs_args
has 84 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.field_Query_transactionsAtHeadRange_args
has 84 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_transactionsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext.field_Query_transactionsRange_args
has 75 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_transactionsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext.field_Query_receipts_args
has 75 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receipts_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext.field_Query_receiptsAtHeadRange_args
has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receiptsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_receiptsRange_args
has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receiptsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_transactionsAtHeadRange_args
has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_transactionsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_logs_args
has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_logs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.fieldContext_Query_transactionsRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_transactionsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactions
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactionsAtHeadRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_transactionsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.field_Query_transactions_args
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_transactions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext.field_Query_logsRange_args
has 13 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_logsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.field_Query_logsAtHeadRange_args
has 12 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_logsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.fieldContext_Query_receiptsAtHeadRange
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_receiptsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_receiptsRange
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_receiptsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_receipts
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_receipts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.field_Query_receiptsRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext.field_Query_receiptsAtHeadRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext._Log
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Transaction
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Receipt
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext.fieldContext_Query_logsRange
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_logsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_logsAtHeadRange
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_logsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_logs
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) fieldContext_Query_logs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.field_Query_logs_args
has 10 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_logs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["contract_address"]; ok {
Method executionContext.field_Query_transactionsAtHeadRange_args
has 10 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_transactionsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext.field_Query_transactionsRange_args
has 9 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_transactionsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext.field_Query_transactionsRange_args
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_transactionsRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_receipts_args
has 9 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receipts_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
Method executionContext.field_Query_receipts_args
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) field_Query_receipts_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 int
if tmp, ok := rawArgs["chain_id"]; ok {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_transactions_args
has 7 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_transactions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 *string
if tmp, ok := rawArgs["tx_hash"]; ok {
Method executionContext._Log_topics
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_topics(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_topics(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_blockTime
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_blockTime(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_blockTime(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_receiptCount
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_receiptCount(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_receiptCount(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_receiptsAtHeadRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_receiptsAtHeadRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_receiptsAtHeadRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query___type
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query___type(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_index
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_index(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_index(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_gas_fee_cap
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_gas_fee_cap(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_gas_fee_cap(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._BlockTime_chain_id
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _BlockTime_chain_id(ctx context.Context, field graphql.CollectedField, obj *model.BlockTime) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BlockTime_chain_id(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_bloom
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_bloom(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_bloom(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_logs
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_logs(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_logs(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_block_number
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_block_number(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_block_number(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_post_state
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_post_state(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_post_state(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Directive_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___EnumValue_name
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_name(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_tx_index
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_tx_index(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_tx_index(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_cumulative_gas_used
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_cumulative_gas_used(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_cumulative_gas_used(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_type
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_type(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_type(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_data
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_data(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_data(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_logs
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_logs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_logs(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_blockTimeCount
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_blockTimeCount(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_blockTimeCount(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_logsAtHeadRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_logsAtHeadRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_logsAtHeadRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query___schema
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query___schema(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_status
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_status(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_status(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_transaction_index
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_transaction_index(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_transaction_index(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_isDeprecated
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._BlockTime_timestamp
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _BlockTime_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.BlockTime) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BlockTime_timestamp(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_receipts
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_receipts(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_receipts(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_txSender
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_txSender(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_txSender(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_data
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_data(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_data(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_removed
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_removed(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_removed(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_page
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_page(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_page(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_receiptsRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_receiptsRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_receiptsRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_tx_hash
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_tx_hash(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_tx_hash(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_firstStoredBlockNumber
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_firstStoredBlockNumber(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_firstStoredBlockNumber(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_transactionsRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_transactionsRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_transactionsRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_lastIndexed
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_lastIndexed(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_lastIndexed(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_tx_hash
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_tx_hash(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_tx_hash(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_gas_used
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_gas_used(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_gas_used(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_value
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_value(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_value(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_block_number
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_block_number(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_block_number(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_gas_tip_cap
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_gas_tip_cap(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_gas_tip_cap(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_type
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_type(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_type(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_timestamp
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_timestamp(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_timestamp(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_page
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_page(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_page(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_logs
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_logs(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_logs(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_chain_id
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_chain_id(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_chain_id(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_json
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_json(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_json(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_transactions
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_transactions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_transactions(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_transactionsAtHeadRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_transactionsAtHeadRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_transactionsAtHeadRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_protected
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_protected(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_protected(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_sender
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_sender(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_sender(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_lastStoredBlockNumber
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_lastStoredBlockNumber(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_lastStoredBlockNumber(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_logCount
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_logCount(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_logCount(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_contract_address
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_contract_address(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_contract_address(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_block_hash
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_block_hash(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_block_hash(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_transaction
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_transaction(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_transaction(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_transaction
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_transaction(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_transaction(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_chain_id
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_chain_id(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_chain_id(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_lastConfirmedBlockNumber
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_lastConfirmedBlockNumber(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_lastConfirmedBlockNumber(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_gas
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_gas(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_gas(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_tx_hash
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_tx_hash(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_tx_hash(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_json
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_json(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_json(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Log_receipt
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log_receipt(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Log_receipt(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Query_logsRange
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Query_logsRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Query_logsRange(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_chain_id
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_chain_id(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_chain_id(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._BlockTime_block_number
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _BlockTime_block_number(ctx context.Context, field graphql.CollectedField, obj *model.BlockTime) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_BlockTime_block_number(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_contract_address
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_contract_address(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_contract_address(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Receipt_json
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt_json(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Receipt_json(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_receipt
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_receipt(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_receipt(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_nonce
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_nonce(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_nonce(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___EnumValue_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_type
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_type(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___EnumValue_deprecationReason
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___InputValue_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_fields
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_fields(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_interfaces
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_interfaces(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Directive_args
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_args(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_types
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_types(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___EnumValue_isDeprecated
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_mutationType
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_subscriptionType
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_name
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_name(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Directive_name
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_name(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Directive_isRepeatable
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_queryType
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_queryType(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_page
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_page(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_page(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_enumValues
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_enumValues(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_args
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_args(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_inputFields
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_inputFields(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_name
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_name(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_description
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_description(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_kind
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_kind(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_specifiedByURL
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_gas_price
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_gas_price(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_gas_price(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___InputValue_name
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_name(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___InputValue_type
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_type(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Schema_directives
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Schema_directives(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext._Transaction_to
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction_to(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Transaction_to(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_possibleTypes
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Field_deprecationReason
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Type_ofType
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Type_ofType(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___Directive_locations
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___Directive_locations(ctx, field)
if err != nil {
return graphql.Null
}
Method executionContext.___InputValue_defaultValue
has 5 return statements (exceeds 4 allowed). Open
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
if err != nil {
return graphql.Null
}
Similar blocks of code found in 2 locations. Consider refactoring. Open
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package resolvers
import (
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105159.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76