aboutsummaryrefslogblamecommitdiffstats
path: root/vendor/github.com/99designs/gqlgen/graphql/oneshot.go
blob: dd31f5baa7961acec4cd01089d60fb5f932fb232 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                               
package graphql

func OneShot(resp *Response) func() *Response {
	var oneshot bool

	return func() *Response {
		if oneshot {
			return nil
		}
		oneshot = true

		return resp
	}
}