Skip to content

Union type RestFunctionOrString can only include Object types, it cannot include String. #266

Closed

Description

@jean9696

Hi there,

I'm trying to use the directive you added in the last beta version but apparently it's not a valid graphql schema:

Union type RestFunctionOrString can only include Object types, it cannot include String.

Plus, union RestFunctionOrString = String | RestFunction cannot be used as an Input
There are already many issues about this subject like here.

What do you think about just changing it to RestFunction ? Or creating a new scalar maybe ?

Activity

  1. basicdays commented on Dec 7, 2020

    @basicdays

    Just ran into this, reported over in apollo-tooling though maybe this is the better location for it. apollographql/apollo-tooling#2180

    I'm also seeing discussion here: graphql/graphql-spec#215

    Not quite a GraphQL ninja at the moment, but anyone know if there is a way to define that type as "any" for now since we're not really able to accurately model the type definition? It would at least remove the breaking validation for now until something can be figured out. 🤷

  2. fbartho commented on Dec 7, 2020

    @fbartho
    Collaborator

    @jbaxleyiii or @benjamn -- this is a compatibility issue with ApolloClient3 which is probably a relatively urgent issue. (My team hasn't upgraded to the ApolloClient3 version yet, but it's happening next quarter)

    Do you have any advice here?

  3. fbartho commented on Jan 5, 2022

    @fbartho
    Collaborator

    I'm going to close this, as I think it was resolved in v0.8.0 with #241

  4. revyh commented on Feb 17, 2022

    @revyh

    No, I still experience this issue on 0.9.0-rc.1

  5. BraveHead commented on Jul 20, 2022

    @BraveHead

    me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions