GHC 2019-06-18

1 comment.

, https://git.io/fja7t in graphql-python/graphene-sqlalchemy
Probably not a good place to discuss how graphene-sqlalchemy works, but guess I'll respond one more time (everyone else: sorry about the noise).

@vaskokj Use introspection[1] to look at generated schema (GraphiQL Docs panel is another way to consume the introspection data, but sometimes it's nice to see everything at once). It should help you a lot.

> Commented out all_users and all_transaction you do not get the warning. 

That's because you also commented out all references to `User` and `Transaction`. Use introspection and you'll realize they don't appear in the schema at all. No inferred types, of course no warning.

Forget about `SQLAlchemyConnectionField`, you think the connection field-related warning came from `SQLAlchemyConnectionField` when it's got nothing to do with it. Instead, consider this `Query` type:

```py
class Query(ObjectType):
    user = Field(User)  # Field is graphene.Field
    transaction = Field(Transaction)
```

And play with field exclusion:

```py
class Transaction(SQLAlchemyObjectType):
    class Meta:
        model = TransactionModel
        interfaces = (Node,)
        exclude_fields = ("user",)  # Try to turn this on and off
```

Again, use introspection. You should understand what I meant.

Finally, I found the source code fairly readable, so you can always just read the code to understand what's going on.

[1] https://graphql.org/learn/introspection/

(I made a mistake in my [original comment](https://github.com/graphql-python/graphene-sqlalchemy/issues/228#issuecomment-502324541) and posted an update.)