github.com/opiuman/genqlient@v1.0.0/generate/testdata/parsing/fragments.go (about) 1 package parsing 2 3 const MyFragment = ` 4 # @genqlient 5 fragment MyFragment on MyType { 6 myFragmentField 7 ...NestedFragment 8 } 9 ` 10 11 var _ = ` 12 # @genqlient 13 fragment NestedFragment on MyType { 14 myOtherFragmentField 15 } 16 ` 17 18 const MyQuery = ` 19 # @genqlient 20 query MyQuery { 21 myField 22 myOtherField { 23 ...MyFragment 24 } 25 } 26 ` 27 28 func query(s string) {} 29 30 func MyMutation() { 31 query(` 32 # @genqlient 33 mutation MyMutation { 34 myField 35 myOtherField { 36 ...MyFragment 37 } 38 } 39 `) 40 } 41 42 const ( 43 NotAString = 1 44 NotAQuery = `query 45 writing with GraphQL is fun!` 46 )