Skip to content

task: Change behavior of include to only include the requested fields #192

@dgarros

Description

@dgarros

Component

Python SDK

Task Description

Currently it's possible to specify include and exclude when querying a node or a group of nodes from Infrahub.

Both methods are currently working on top of the default set of fields, meaning that

  • include can be used to add fields that are not included by default
  • exclude can be used to remove fields that are included by default

The issue with the current behavior is that the performance of a given query change over time if the schema changes and if more fields are being queried by default. there is no way to control that. this can be especially impacting if the queyr is also using prefetch_relationships

The proposal is to change the behavior of include to only include the fields that have been specified in include this way a query using include will be predictable and won't be impacted by future schema changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    state/backlogThis issue is part of the backlogtype/taskBody of work related to an epic

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions