Skip to content

Commit

Permalink
fix typography errors (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac authored Apr 8, 2023
1 parent a77eb8c commit 104cfd9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ident/ident.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func ParseScreamingSnakeCase(name string) Name {
// Name is an identifier name, broken up into individual words.
type Name []string

// ToMixedCaps expresses identifer name in MixedCaps naming convention.
// ToMixedCaps expresses identifier name in MixedCaps naming convention.
//
// E.g., "ClientMutationID".
func (n Name) ToMixedCaps() string {
Expand All @@ -141,7 +141,7 @@ func (n Name) ToMixedCaps() string {
return strings.Join(n, "")
}

// ToLowerCamelCase expresses identifer name in lowerCamelCase naming convention.
// ToLowerCamelCase expresses identifier name in lowerCamelCase naming convention.
//
// E.g., "clientMutationId".
func (n Name) ToLowerCamelCase() string {
Expand Down
2 changes: 1 addition & 1 deletion scalar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
)

// Note: These custom types are kept for backwards compatability. Native
// Note: These custom types are kept for backwards compatibility. Native
// types for queries and responses are supported, with the exception of the ID.

type (
Expand Down
10 changes: 5 additions & 5 deletions subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const (
SubscriptionWaiting SubscriptionStatus = 0
// SubscriptionRunning the subscription is up and running
SubscriptionRunning SubscriptionStatus = 1
// SubscriptionUnsubcribed the subscription was manually unsubscribed by the user
SubscriptionUnsubcribed SubscriptionStatus = 2
// SubscriptionUnsubscribed the subscription was manually unsubscribed by the user
SubscriptionUnsubscribed SubscriptionStatus = 2

// SubscriptionsTransportWS the enum implements the subscription transport that follows Apollo's subscriptions-transport-ws protocol specification
// https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
Expand Down Expand Up @@ -668,14 +668,14 @@ func (sc *SubscriptionClient) Unsubscribe(id string) error {
return fmt.Errorf("%s, %w", id, ErrSubscriptionNotExists)
}

if sub.status == SubscriptionUnsubcribed {
if sub.status == SubscriptionUnsubscribed {
return nil
}
var err error
if sub.status == SubscriptionRunning {
err = sc.protocol.Unsubscribe(ctx, *sub)
}
sub.status = SubscriptionUnsubcribed
sub.status = SubscriptionUnsubscribed
ctx.SetSubscription(sub.key, sub)

sc.checkSubscriptionStatuses(ctx)
Expand Down Expand Up @@ -821,7 +821,7 @@ func (sc *SubscriptionClient) reset() {

for key, sub := range subContext.GetSubscriptions() {
// remove subscriptions that are manually unsubscribed by the user
if sub.status == SubscriptionUnsubcribed {
if sub.status == SubscriptionUnsubscribed {
continue
}
if sub.status == SubscriptionRunning {
Expand Down
2 changes: 1 addition & 1 deletion subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestSubscription_LifeCycleEvents(t *testing.T) {
t.Fatalf("expected OnConnected event, got none")
}
if !wasDisconnected {
t.Fatalf("expected OnDisonnected event, got none")
t.Fatalf("expected OnDisconnected event, got none")
}
}

Expand Down
2 changes: 1 addition & 1 deletion subscriptions_transport_ws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ func TestTransportWS_ResetClient(t *testing.T) {

time.Sleep(2 * time.Second)

// test susbcription ids
// test subscription ids
sub1 := subscriptionClient.getContext().GetSubscription(subId1)
if sub1 == nil {
(*t).Fatalf("subscription 1 not found: %s", subId1)
Expand Down

0 comments on commit 104cfd9

Please sign in to comment.