kutuluk / loglevel-plugin-remote

A loglevel plugin for sending browser logs to a server
MIT License
102 stars 36 forks source link

Modify format of payload #37

Open sordell opened 3 years ago

sordell commented 3 years ago

Please forgive me if this is not the right place to ask or the right question to ask.

I was hoping to be able to specify our GraphQL server (Apollo GraphQL) as the remote server url. The problem is the format of the request body is fixed when making calls to a GraphQL server.

curl --location --request POST 'http://localhost:4000/query' \ --header 'Content-Type: application/json' \ --data-raw '{"query":"mutation LoggerMutation($input: LoggerObject!) {\n log(input: $input)","variables":{"sid":"<secret>","input":{"message":"<message>"}}}}'

There doesn't appear to be a way to format the request body itself?

Thanks in advance.