Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Suggestion: Make it easier to identify or bypass only submitting dirty attributes on update

Abierto
#1,227 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
ruby
Área
api, backend

Línea de trabajo

Empieza leyendo el comportamiento de dirty-attributes introducido en PR 1149 y sigue la ruta de guardado que envía la solicitud PUT. Define qué comportamiento propuesto está incluido en el alcance —evitar las dirty checks, inspeccionar los cambios o informar de payloads vacíos— y considera completado el issue cuando el comportamiento seleccionado esté especificado con una forma clara de verificarlo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

This feature to only send changed fields has tripped me up a few times and can be difficult to identify.

The problem I've ran into is when the object state hasn't changed and you call save it will still do the put request with an empty payload and you end up with an error with something like {"errors":{"metafield":"Required parameter missing or invalid"} which isn't very clear about the problem. As far as I can tell there isn't a method that I can use to inspect the object to decide if I need to save or not.

If this functionality is really important what do you think about a few additional features to make it easier to work with or bypass, such as:

  1. Allow bypassing the dirty attributes check and sending all attributes on save. Maybe something like save(only_changed: false)
  2. Provide a method that we can use to inspect the object to see if there are changes so we can skip the save call if we want. Something like changed? or dirty? maybe?

It would also be great if an error or warning of some sort was returned if the payload you are submitting is empty.

Lenguaje dominante
Ruby
Estrellas
1.1k
Forks
484
Merge medio
4 h 38 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Shopify/shopify-api-ruby

Todos los issues de Shopify/shopify-api-ruby

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.