firebase / firebase/firebase-tools

Firebase Dataconnect Compiler does not allow schema-defined types

Aperta
#9,167 5 commenti 5 reazioni 1 assegnatario Rivendicata da @mtr002 Vedi su GitHub
api: dataconnect fr: dataconnect nested input reproducible type: feature request
Lingua principale
TypeScript
Stelle
4.5k
Fork
1.3k
Merge medio
1g 12h
PR unite (30g)
84

Descrizione

### 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}`)"

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.