public static function nodeDefinitions(callable $idFetcher, callable $typeResolver = null) {
        $nodeInterface = new InterfaceType([
            'name' => 'Node',
            'description' => 'An object with an ID',
            'fields' => [
                'id' => [
                    'type' => Type::nonNull(Type::id()),
                    'description' => 'The id of the object',
                ]
            ],
            'resolveType' => $typeResolver
        ]);

        $nodeField = [
            'name' => 'node',
            'description' => 'Fetches an object given its ID',
            'type' => $nodeInterface,
            'args' => [
                'id' => [
                    'type' => Type::nonNull(Type::id()),
                    'description' => 'The ID of an object'
                ]
            ],
            'resolve' => function ($obj, $args, $context, $info) use ($idFetcher) {
                return $idFetcher($args['id'], $context, $info);
            }
        ];

        return [
            'nodeInterface' => $nodeInterface,
            'nodeField' => $nodeField
        ];
    }