Replies: 2 comments
-
Hi,
You could propably put such an interface into GraphQL.Client.Abstractions.Websocket or straight into GraphQL.Client (which should have been named GraphQL.Client.Http, but that name on nuget.org has already been taken by someone...). The only benefit I can see of having that interface and not deriving a class from |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. I have created a PR along these lines here: #537 |
Beta Was this translation helpful? Give feedback.
-
I'm looking at exposing the following GraphQLHttpClient specific members to the IGraphQLClient interface:
This is so users can hide the concrete GraphQLHttpClient and use IGraphQLClient interface throughout their code bases making it easier to replace with mocks for unit testing.
Having tried to make an PR for this I found that the GraphQLWebsocketConnectionState is defined in the Abstractions.Websocket project making it inaccessible to the Abstractions project. Moving types around will break backwards compatibility so the only way I can see to resolve this is to create a new IGraphQLWebSocketClient interface that extends IGraphQLClient and defines the extra methods. GraphQLHttpClient would then implement both interfaces.
Before I try this, is this a good idea? Does anyone have a better suggestion?
Beta Was this translation helpful? Give feedback.
All reactions