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

Remove Client.NewQuery() #94

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Remove Client.NewQuery() #94

merged 2 commits into from
Aug 25, 2023

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Aug 19, 2023

Client.NewQuery() was written when Chris understood graph queries less well than he does now. In particular, before he understood that there are different types of query structures:

  • path queries (those which start with node()
  • match queries (those which start with match()
  • possibly others?

Client.NewQuery() returns a PathQuery primed with a client and a blueprint ID.

All uses of NewQuery() in the terraform provider have been replaced with one of these:

  • new(PathQuery).SetBlueprintId().SetClient()
  • new(MatchQuery).SetBlueprintId().SetClient()

This PR:

  • Removes Client.NewQuery() and Client.newQuery()
  • Converts uses of those methods to use the type-specific query instantiations cited above.

Closes #21

@chrismarget-j chrismarget-j changed the title WIP: Remove Client.NewQuery() Remove Client.NewQuery() Aug 20, 2023
@chrismarget-j chrismarget-j merged commit 1311906 into main Aug 25, 2023
1 check passed
@chrismarget-j chrismarget-j deleted the task/21-remove-newquery branch August 25, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate Client.NewQuery()
2 participants