Skip to content

Supports fields localization as variables when QueryWithVariables #7

@AlexandreRoba

Description

@AlexandreRoba

Hi,

I've tried to perform a query which returns localized fields. I would like to pass the localization as variables such as:

var variables = map[string]string{
		"$local":"en:fr:.",
	}
	const q = `
{
  items(func: has(item)){
    id: uid
    short_description: title@$local.
    long_description: description@$local.
  }
}
`
	response, err := txn.QueryWithVars(ctx, q,variables)

I'm getting a lexical error when I try this.

It would make sense to be able to query with a local as variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions