#Is there a way to detect between local api and http api?

3 messages · Page 1 of 1 (latest)

unkempt pebble
#

I have a field I want to use when using the local api, do not want to return when the http api is called. V2

wide craneBOT
normal glacier
#

Hey @unkempt pebble,

If you have access to the req object, then you can access req.payloadAPI which will return one of either 'GraphQL', 'local', or 'REST'