File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed 
packages/cli/src/commands/setup/realtime/templates/subscriptions Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ type Subscription {
247247
248248### Countdown Timer Example 
249249
250- Counts down from a starting values  by an interval. 
250+ Counts down from a starting value  by an interval. 
251251
252252```graphql 
253253subscription CountdownFromInterval { 
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const schema = gql`
2020const countdown = {
2121  countdown: {
2222    subscribe: (
23-       _,
23+       _: unknown ,
2424      {
2525        from = 100,
2626        interval = 10,
Original file line number Diff line number Diff line change @@ -16,30 +16,32 @@ export type NewMessageChannel = {
1616export type NewMessageChannelType = PubSub<NewMessageChannel>
1717
1818/**
19-  * To test this NewMessage subscription, run the following in one GraphQL Playground to subscribe:
19+  * To test this NewMessage subscription, run the following in one GraphQL
20+  * Playground to subscribe:
2021 *
2122 * subscription ListenForNewMessagesInRoom {
2223 *   newMessage(roomId: "1") {
23-  *     body
2424 *     from
25+  *     body
2526 *   }
2627 * }
2728 *
2829 *
29-  * And run the following in another GraphQL Playground to publish and send a message to the room:
30+  * And run the following in another GraphQL Playground to publish and send a
31+  * message to the room:
3032 *
3133 * mutation SendMessageToRoom {
3234 *   sendMessage(input: {roomId: "1", from: "hello", body: "bob"}) {
33-  *     body
3435 *     from
36+  *     body
3537 *   }
3638 * }
3739 */
3840const newMessage = {
3941  newMessage: {
4042    subscribe: (
41-       _,
42-       { roomId },
43+       _: unknown ,
44+       { roomId }: { roomId: string } ,
4345      { pubSub }: { pubSub: NewMessageChannelType }
4446    ) => {
4547      logger.debug({ roomId }, 'newMessage subscription')
Original file line number Diff line number Diff line change 11import type { SendMessageInput } from 'types/graphql'
2- import type { NewMessageChannelType } from 'src/subscriptions/newMessage/newMessage.js' 
2+ 
33import { logger } from 'src/lib/logger'
4+ import type { NewMessageChannelType } from 'src/subscriptions/newMessage/newMessage.js'
45
5- export const room = ({ id }) => [id]
6+ export const room = ({ id }: { id: string } ) => [id]
67
78export const sendMessage = async (
89  { input }: { input: SendMessageInput },
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments