-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[graphql] add permissions field to WorkspaceLocationEntryStatus #21946
[graphql] add permissions field to WorkspaceLocationEntryStatus #21946
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @alangenfeld and the rest of your teammates on Graphite |
query WorkspacePermissionsQuery { | ||
locationStatusesOrError { | ||
__typename | ||
... on WorkspaceLocationStatusEntries { | ||
entries { | ||
permissions { | ||
permission | ||
value | ||
disabledReason | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can update this to just test both
def resolve_permissions(self, graphene_info): | ||
permissions = graphene_info.context.permissions_for_location(location_name=self.name) | ||
return [GraphenePermission(permission, value) for permission, value in permissions.items()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i deprecate or remove the other one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could imagine a world in which the current one is being accessed, I have seen people asking about programatic access to the users page in cloud for example
e10d2db
to
8ee84d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing both seems prudent, if only for push safety
def resolve_permissions(self, graphene_info): | ||
permissions = graphene_info.context.permissions_for_location(location_name=self.name) | ||
return [GraphenePermission(permission, value) for permission, value in permissions.items()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could imagine a world in which the current one is being accessed, I have seen people asking about programatic access to the users page in cloud for example
8ee84d7
to
4dc6e70
Compare
4dc6e70
to
8894587
Compare
…ter-io#21946) Fetching these off the workspace directly blocks them on loading the whole workspace, and in some environments that is costly. Make it available off of the other code location scoped object for faster access. ## How I Tested These Changes updated test
Fetching these off the workspace directly blocks them on loading the whole workspace, and in some environments that is costly.
Make it available off of the other code location scoped object for faster access.
How I Tested These Changes
updated test