1 package graphql 2 3 import "context" 4 5 func OneShot(resp *Response) ResponseHandler { 6 var oneshot bool 7 8 return func(context context.Context) *Response { 9 if oneshot { 10 return nil 11 } 12 oneshot = true 13 14 return resp 15 } 16 } 17
View as plain text