apollo-link-logger icon indicating copy to clipboard operation
apollo-link-logger copied to clipboard

Not Working Well on Server Side when using SSR

Open JimmyLv opened this issue 5 years ago • 4 comments

We are using SSR with Apollo client, as you can see the logging format is not clear and not stringify the [Array] and [Object] content:

image

JimmyLv avatar Aug 02 '18 02:08 JimmyLv

+1 I see the same

james-ff avatar Sep 06 '18 12:09 james-ff

yeah would be nice to have a config option flag for ssr

twdrake-ap avatar Feb 03 '19 04:02 twdrake-ap

(note to self) I simply used JSON.stringify() around the restult as a temporary workaround:

    logging.log("INIT", JSON.stringify(operation));
    logging.log("RESULT", JSON.stringify(result));

saerdnaer avatar Mar 20 '19 13:03 saerdnaer

@saerdnaer You can use JSON.stringify(object, null, 2) to have 2 spaces indentation.

image

viniciussbs avatar Mar 23 '19 04:03 viniciussbs