overblog / GraphQLBundle

This bundle provides tools to build a complete GraphQL API server in your Symfony App.
MIT License
782 stars 221 forks source link

Quick Start issues and suggested improvements #285

Closed bartosz-maciaszek closed 6 years ago

bartosz-maciaszek commented 6 years ago
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? yes/no
Version/Branch 0.10.3

Hey,

I'm going through the Quick Start guide using Symfony4 and flex, but I ran into a couple of issues:

  1. Changing type: yaml to type: graphql causes an exception:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] The value "graphql" is not allowed for path "overblog_graphql.definitions.mappings.types.0.type". Permissible values: "yaml", "xml"

  1. Because of missing types, I'm getting Unknown type with alias \"Query\" (verified service tag) exception when trying to do anything. Since the default configuration specifies that type, it would be great if it was included in the package or at least described in the doc how to create it to get a working graphql server easily.

  2. After adding the snippet below to config/packages/graphql.yaml:

            resolver_maps:
                - App\Resolver\MyResolverMap

I'm getting another exception saying:

[Symfony\Component\Yaml\Exception\ParseException] A colon cannot be used in an unquoted mapping value at line 6 (near " - App\Resolver\MyResolverMap").

  1. Overblog\GraphQLBundle\Resolver\ResolverMap class that you suggest to use when creating App\Resolver\MyResolverMap does not exist. Maybe it used to exist in the previous versions of the bundle and the documentation is just outdated?

Any help would be greatly appreciated!

mcg-web commented 6 years ago

Hi, this feature is available only in dev version 0.11-dev (master branch), 0.10 doc can be found here

bartosz-maciaszek commented 6 years ago

Thanks for a quick reply, I'll give dev-master a go.

mcg-web commented 6 years ago

All feedback is welcome :+1: