Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Include arguments for InfrahubGraphQLQueryAnalyzer #5540

Open
ogenstad opened this issue Jan 21, 2025 · 0 comments
Open

feature: Include arguments for InfrahubGraphQLQueryAnalyzer #5540

ogenstad opened this issue Jan 21, 2025 · 0 comments
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/feature New feature or request

Comments

@ogenstad
Copy link
Contributor

Component

API Server / GraphQL

Describe the Feature Request

There's been some work to analyze filters and arguments for the InfrahubGraphQLQueryAnalyzer, but we need to expand it to support all option types (mostly various list types).

These then need to be matched on a per query basis to determine if we can use the query to get a unique node back.

The goal is to be able to analyze a query that looks like this:

query device_config($device: String!) {
  InfraDevice(name__value: $device) {
    edges {
      node {
	name {
	  value
	}
	interfaces {
	  edges {
	    node {
	      name {
		value
	      }
	    }
	  }
	}
      }
    }
  }
  InfraServer {
    edges {
      node {
	name {
	  value
	}
      }
    }
  }
}

Then based on the schema figure out that name__value is a unique value and that this query should only return one object.

Describe the Use Case

This needs to be in place to continue the work on #4991

Additional Information

No response

@ogenstad ogenstad added group/backend Issue related to the backend (API Server, Git Agent) type/feature New feature or request labels Jan 21, 2025
@ogenstad ogenstad added this to the Infrahub - 1.2 milestone Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant