-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subscriptionType ? #155
Comments
webonyx/graphql-php is the best place to debate about this, the bundle is just the symfony implementation. This feature is requiring a direct implementation in the main lib... Maybe using this https://siler.leocavalcante.com/graphql/subscriptions.html could also helps... |
feel free to reopen if needed... |
sorry for reopening this issue after a long time, i decided to implement subscription on top of your bundle, siler's example works when you create a symfony command that runs ratchet on a different port, i can pass the schema to the websocket server, however subscription resolvers need to take the payload in the function argument instead of the query variables, and i found some difficulties to add a new type of resolvers to your bundle, |
@omarsoufiane can you provide some snippets of the issue please ? |
first graphiql and react needs a higher default version on the config
you need a class with a subscribe and publish method that we will register as a service to use it in the sumfony command and mutation resolver `use GraphQL\Schema; use Ratchet\Client; const INIT = 'init'; class Subscription
}` then create a command that runs the websocket server on a different port `class SubscriptionCommand extends ContainerAwareCommand
//the problem is here i guess, the schema already has resolvers and they don't accept payloads as //function argument
}` |
subscription server and subscription manager are two files i got from siler: since they rely on a function specific to the framework yo need to add it ` /*
|
thank you for the example. I don't have a lot of time to work on that right now but hope to get a look more carefully on this before the weekend... |
is there a possibility to add subscription type to the bundle or make another compatible bundle like the data loader
i think this would be possible with a library like ratchet
they already discussed the issue in webonyx
webonyx/graphql-php#9
The text was updated successfully, but these errors were encountered: