SOFA: Maximum call stack size exceeded

Hey Urigo,

First of all, thanks for this library. the concept is really cool, but… I’ve just follow the simple configuration and tried to run, got this error:

RangeError: Maximum call stack size exceeded

This is the schema I am passing. It works fine with apollo-server:

import { makeExecutableSchema } from "apollo-server"
import typeDefs from "./typeDefs"
import resolvers from "./resolvers"
import {
  isAuthDirective,
  hasScopeDirective,
  isAdminDirective,
} from "./directives"

export default makeExecutableSchema({
  typeDefs,
  resolvers,
  schemaDirectives: {
    isAuth: isAuthDirective,
    hasScope: hasScopeDirective,
    isAdmin: isAdminDirective,
  }
})

And the full stack trace:

RangeError: Maximum call stack size exceeded
    at resolveField (/foo/node_modules/sofa-api/src/operation.ts:278:22)
    at /foo/node_modules/sofa-api/src/operation.ts:218:16
    at Array.map (<anonymous>)
    at resolveSelectionSet (/foo/node_modules/sofa-api/src/operation.ts:217:39)
    at resolveField (/foo/node_modules/sofa-api/src/operation.ts:328:21)
    at /foo/node_modules/sofa-api/src/operation.ts:218:16
    at Array.map (<anonymous>)
    at resolveSelectionSet (/foo/node_modules/sofa-api/src/operation.ts:217:39)
    at resolveField (/foo/node_modules/sofa-api/src/operation.ts:328:21)
    at /foo/node_modules/sofa-api/src/operation.ts:218:16
    at Array.map (<anonymous>)
    at resolveSelectionSet (/foo/node_modules/sofa-api/src/operation.ts:217:39)
    at resolveField (/foo/node_modules/sofa-api/src/operation.ts:328:21)
    at /foo/node_modules/sofa-api/src/operation.ts:218:16
    at Array.map (<anonymous>)
    at resolveSelectionSet (/foo/node_modules/sofa-api/src/operation.ts:217:39)

Let me know what else I can provide to help you. Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@birkir I do have recursion in my schema. But no, I’ve passed the same. @Urigo I will to create a reproduction and update here soon 👍