Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.
This repository was archived by the owner on May 11, 2026. It is now read-only.

Issue with edgeAS #21

Description

@iammuho

Hey everyone,

First thank you for this amazing repo. My issue is about EdgeAS;

	var output []map[string]interface{}
	_, err := r.Conn.QueryType("User").
		Filter(
			dqlx.UID(uid),
		).
		EdgeAs("total", "friendship", dqlx.Facets(dqlx.And{
			dqlx.GtFn("requested_at", util.BeginningOfDay().Unix()),
			dqlx.LtFn("requested_at", util.EndOfDay().Unix()),
		}), dqlx.Select("uid")).
		EdgeAs("to", "friendship", dqlx.UID(otherUSER), dqlx.Facets(dqlx.And{
			dqlx.GtFn("requested_at", util.BeginningOfWeek().Unix()),
			dqlx.LtFn("requested_at", util.EndOfWeek().Unix()),
		}), dqlx.Select("uid")).
		UnmarshalInto(&output).
		Execute(ctx)

	log.Print(output)

when I run it, I'm getting an error as

"rpc error: code = Unknown desc = line 1 column 35: Expected Left round brackets. Got: lex.Item [9] \"func\" at 1:35",

And the generated DQL is

query Rootquery($0:string, $1:int, $2:int, $3:int, $4:int, $5:string) { to as(func: type(<User>)) @filter(uid($0)) { <hey> @facets((gt(<requested_at>,$1) AND lt(<requested_at>,$2))) { <uid> } <hey> @facets((gt(<requested_at>,$3) AND lt(<requested_at>,$4))) @filter(uid($5)) { <uid> } } }
map[$0:0x57 $1:1662760800 $2:1662847199 $3:1662242400 $4:1662847199 $5:0x56]

anyone can help me ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions