andyrichardson / subscriptionless

GraphQL subscriptions (and more) on serverless infrastructure
MIT License
93 stars 3 forks source link

feat: Pluggable Management Api #11

Open reconbot opened 3 years ago

reconbot commented 3 years ago

Say you want to use a custom endpoint for your management api communication. Say you want specific configuration? Well now you can! By providing an already constructed management api class. If you don't want to, no problem, we'll assume your endpoint for you from the incoming websocket event.

TODO:

closes #8

andyrichardson commented 3 years ago

Hopefully we can push this into aws-lambda and use use their events.

Totally agree! I think there was some kind of confusion that a lot of these websocket context attributes are optional (source)

reconbot commented 3 years ago

Unless you got big objections I'd be happy to have this merge as is. This change lets me drop my fork ;-)

reconbot commented 3 years ago

I pushed a type check fix - opened #12 to run ci on prs

reconbot commented 3 years ago

Ahh I forgot my own todo items! I'll get on that

reconbot commented 3 years ago

Pushed some docs

Decide if we should put https into the generated endpoint domain

What do you think? It seems to work as is, so I'm alright with it.

reconbot commented 3 years ago

Let me know what you want to do with the closures. I pushed the types.

andyrichardson commented 3 years ago

Merged a few of your PRs - will get back to this one some time this week :100:

reconbot commented 3 years ago

Ftr this is working well on my fork

reconbot commented 3 years ago

attempted a rebase

reconbot commented 3 years ago

I've successfully finished rebasing and extending to the new ping/pong functionality. I'll give it some manual testing on my project

reconbot commented 3 years ago

This changes the input objects to the handler function so it doesn't match aws-lambda. That's probably not desirable.

andyrichardson commented 3 years ago

I've been meaning to come back to this - plan to give it another pass over the next week

reconbot commented 3 years ago

In production I lightened up the types to match only the apis and arguments we use to allow for adapters.