Skip to content

Regex query with variables using Go client QueryWithVars #2333

@mbudge

Description

@mbudge

Is it possible to use variables with regex search in Go?

We could built the query with SprintF but that would be insecure.

q :=query Search($searchterm: string) {
subdomains(func: regexp(name, /^.*$searchterm/)) {
uid:uid
name:name
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething is broken.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions