MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / addProject

Function addProject

query/vector/vector_graphql_test.go:81–99  ·  view source on GitHub ↗
(t *testing.T, hc *dgraphapi.HTTPClient, project ProjectInput)

Source from the content-addressed store, hash-verified

79}
80
81func addProject(t *testing.T, hc *dgraphapi.HTTPClient, project ProjectInput) {
82 query := `
83 mutation addProject($project: AddProjectInput!) {
84 addProject(input: [$project]) {
85 project {
86 title
87 title_v
88 }
89 }
90 }`
91
92 params := dgraphapi.GraphQLParams{
93 Query: query,
94 Variables: map[string]interface{}{"project": project},
95 }
96
97 _, err := hc.RunGraphqlQuery(params, false)
98 require.NoError(t, err)
99}
100
101func queryProjectUsingTitle(t *testing.T, hc *dgraphapi.HTTPClient, title string) ProjectInput {
102 query := ` query QueryProject($title: String!) {

Callers 1

Calls 1

RunGraphqlQueryMethod · 0.80

Tested by

no test coverage detected