Skip to content

Add option to override "Cycle detected: Fragment" #2510

@mbudge

Description

@mbudge

Hi,

I'm wrote a query which legitimately reuses fragments, but we get the cycle detected error, which means we have to copy and rename the fragment.

Would it be possible to add an option to override the cycle detection?

{
     domain(func: has(domain)) @filter(eq(name, example.co.uk)) {
          ...UpdateFragment
     }
}

The query is quite large so I'm not going to copy the whole thing. But doing this to get round the cycle detection means we have more code to maintain, which could be buggy if we miss something.

fragment PortFrag {
     uid
     ...UpdateFragmentCopy
}
fragment AFragment {
	uid
	name
}
fragment AFragmentCopy {
	uid
	name
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/graphqlIssues related to GraphQL support on Dgraph.area/querylangIssues related to the query language specification and implementation.kind/questionSomething requiring a response.priority/P2Somehow important but would not block a release.status/more-info-neededThe issue has been sent back to the reporter asking for clarifications

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions