kamilkisiela / apollo-angular

A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
https://apollo-angular.com
MIT License
1.5k stars 309 forks source link

GraphQL Request must include at least one of those two parameters: "query" or "queryId" #1816

Closed GlauberF closed 2 years ago

GlauberF commented 2 years ago

My API uses the library https://github.com/rebing/graphql-laravel, through postman it works, with the library it doesn't.

I get this error: GraphQL Request must include at least one of those two parameters: "query" or "queryId"

I managed to simulate this error in postman, sending it as a GET method, but I looked at the request that the frontend makes and POST is sent.

how do i call with the library:

this._apollo
                .query<any>({
                    query: _query,
                    variables: _variables,
                    fetchPolicy: 'no-cache',
                })
                .pipe(map((result) => result.data['ConfiguracoesTributariasListar']))
                .subscribe()

print error Captura de Tela_selecionar área_20220915170956