8000 Firebase Dataconnect Compiler does not allow schema-defined types · Issue #9167 · firebase/firebase-tools · GitHub 8000
[go: up one dir, main page]

Skip to content

Firebase Dataconnect Compiler does not allow schema-defined types #9167

@the-mars-rover

Description

@the-mars-rover

Environment info

firebase-tools: 14.15.2

Platform: macOS, VSCode

Test case

When implementing the "schema for a movie review app", exactly as per the documentation for data connect provided here:

https://firebase.google.com/docs/data-connect/schemas-guide#movie-schema-intro

And then following this documentation:

https://firebase.google.com/docs/data-connect/mutations-guide#generated-fields

To add the following mutation:

mutation CreateMovie($data: Movie_Data!) {
  movie_insert(data: $data) { key }
}

the Firebase data connect compiler displays this error on the mutation:

"On $data: cannot use Movie_Data as a variable (please use one variable for each field instead, ex: {foo: $foo})"

Steps to reproduce

As per the above, simply follow the linked documentation to create the movie schema and add the mutation, also from the linked documentation.

Expected behavior

There is no error OR the documentation clarifies that schema-defined types are not allowed as arguments, and does not use erroneous examples.

Actual behavior

The Firebase data connect compiler displays this error on the mutation implemented exactly as per the documentation:

"On $data: cannot use Movie_Data as a variable (please use one variable for each field instead, ex: {foo: $foo})"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0