MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / getExportInput

Function getExportInput

graphql/admin/export.go:100–117  ·  view source on GitHub ↗
(m schema.Mutation)

Source from the content-addressed store, hash-verified

98}
99
100func getExportInput(m schema.Mutation) (*exportInput, error) {
101 inputArg := m.ArgValue(schema.InputArgName)
102 inputByts, err := json.Marshal(inputArg)
103 if err != nil {
104 return nil, schema.GQLWrapf(err, "couldn't get input argument")
105 }
106
107 var input exportInput
108 err = json.Unmarshal(inputByts, &input)
109
110 // Export everything if namespace is not specified.
111 if v, ok := inputArg.(map[string]interface{}); ok {
112 if _, ok := v["namespace"]; !ok {
113 input.Namespace = notSet
114 }
115 }
116 return &input, schema.GQLWrapf(err, "couldn't get input argument")
117}

Callers 1

resolveExportFunction · 0.85

Calls 2

GQLWrapfFunction · 0.92
ArgValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…