doesn’t work
schema := `
type DummyType {
name: string
}
`
op := &api.Operation{
Schema: schema,
}
ctx := context.Background()
if err := u.dgraphClient.GetClient().Alter(ctx, op); err != nil {
return nil, err
}
mutator := dgraph.NewMutator(u.dgraphClient)
response, err := mutator.Mutate(struct)
if err != nil {
return nil, err
}
return response, nil
this is what I’m doing. The data gets inserted but I just can’t query by type. With queries that don’t require a type I’m able to retrieve all data. Maybe I’m missing something on the type schema ? But the type is actually in there, the Ratle interface lets me auto-complete with it.