Better detection for when items were scoped?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- graphql, ruby
- Área
- api, authorization
Línea de trabajo
Start with lib/graphql/schema/field/scope_extension.rb at the linked lines 14-18, then examine how runtime metadata is handled. Define a more robust way to distinguish authorized, unchanged external-service lists from lists that were actually scoped; the work is done when this no longer requires a shallow copy and the behavior is covered by the relevant tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Currently, this library checks for whether or not items were scoped by using object equality:
This works when scope_items really did something, but not if you want to skip authorization altogether. For example, if you've got a list of items from an external service, and you want to return them as-is, without scoping or authorization, you'd have to do this:
def self.scope_items(items, ctx)
items.dup # Make a shallow copy so GraphQL-Ruby will know that we authorized this list
end
I bet there's a more robust way to implement this check (and maybe to implement the runtime metadata, too). I'm going to consider it for 3.0.
- Lenguaje dominante
- Ruby
- Estrellas
- 5.4k
- Forks
- 1.4k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 74
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rmosolgo/graphql-ruby
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
rmosolgo/graphql-ruby#5843 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
rmosolgo/graphql-ruby#5763 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
rmosolgo/graphql-ruby#5761 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
rmosolgo/graphql-ruby#5707 · 10 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
rmosolgo/graphql-ruby#5655 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de rmosolgo/graphql-ruby
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
heartcombo/simple_form#1874 ·
-
Category: OneSwap Status: Accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenNebula/one#8237 ·
-
Reconfigure Settings sidebarAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AllYourBot/hostedgpt#882 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
greenelab/lab-website-template#357 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
open-feature/ruby-sdk-contrib#283 ·
Los mantenedores suelen responder en 1 día