MCPcopy Index your code
hub / github.com/git-bug/git-bug / TestQueries

Function TestQueries

api/graphql/graphql_test.go:16–221  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestQueries(t *testing.T) {
17 repo := repository.CreateGoGitTestRepo(t, false)
18
19 random_bugs.FillRepoWithSeed(repo, 10, 42)
20
21 mrc := cache.NewMultiRepoCache()
22 _, events := mrc.RegisterDefaultRepository(repo)
23 for event := range events {
24 require.NoError(t, event.Err)
25 }
26
27 handler := NewHandler(mrc, nil)
28
29 c := client.New(handler)
30
31 query := `
32 query {
33 repository {
34 allBugs(first: 2) {
35 pageInfo {
36 endCursor
37 hasNextPage
38 startCursor
39 hasPreviousPage
40 }
41 nodes{
42 author {
43 name
44 email
45 avatarUrl
46 }
47
48 createdAt
49 humanId
50 id
51 lastEdit
52 status
53 title
54
55 actors(first: 10) {
56 pageInfo {
57 endCursor
58 hasNextPage
59 startCursor
60 hasPreviousPage
61 }
62 nodes {
63 id
64 humanId
65 name
66 displayName
67 }
68 }
69
70 participants(first: 10) {
71 pageInfo {
72 endCursor
73 hasNextPage

Callers

nothing calls this directly

Calls 6

CreateGoGitTestRepoFunction · 0.92
FillRepoWithSeedFunction · 0.92
NewMultiRepoCacheFunction · 0.92
NewHandlerFunction · 0.70
NewMethod · 0.45

Tested by

no test coverage detected