Inconsistent plugins development documentation
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- documentation
Línea de trabajo
Comience con las secciones enlazadas “Enabling via postgraphilerc.js” y “Writing your own plugins”, y luego reproduzca el error de objeto frente a función informado usando el ejemplo mostrado de CorsPlugin. La tarea estará terminada cuando la documentación de plugins explique los tipos de plugins y hooks, sus parámetros y relaciones, y proporcione ejemplos claros de biblioteca, archivo rc y CLI, incluido el plugin CORS existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I'm trying to add a custom plugin to the postgraphile:http:handler event.
Accordint to the https://www.graphile.org/postgraphile/plugins/#enabling-via-postgraphilercjs section, I'm adding it to the plugins rc file section.
According to the https://www.graphile.org/postgraphile/plugins/#writing-your-own-plugins section, I've created my plugin stub:
const CorsPlugin = {
['postgraphile:http:handler'] (req, p2) {
console.log(req);
console.log(p2);
return req;
}
}
module.exports = CorsPlugin
But when running, I'm getting the following error log:
/postgraphile/build-turbo/postgraphile/cli.js:300
throw new Error(`No plugin found matching spec '${name}' - expected function, found '${typeof plugin}'`);
^
Error: No plugin found matching spec '/postgraphile/CorsPlugin' - expected function, found 'object' at /postgraphile/build-turbo/postgraphile/cli.js:300:19
Please update these docs on how to write own plugins.
Also, there's no documentation on how to use the existing CORS plugin example with the rc file to be able to adapt it to my needs. Plugins documentation is overall messy and it's hard to understand what's going on and how to catch anything without a long time googling, discord discussions, or github issues.
My main pain points during all my Postgraphile experience are:
- What type of plugins exists?
- What's the difference between plugin types?
- How plugins and hooks relate?
- What types of hooks exist?
- Which hooks can be set up from which plugins?
- Where to see plugins and hooks parameters documentation?
- How to convert plugins and hooks declaration/connection between different types (middleware, library, rc file, CLI)? If I found an example of a plugin/hook I spend a lot of time trying to adapt it to rc file.
- When I see a comment like
use postgraphile:http:handler to intercept the result if it's for usused by Benjie everywhere I see a wall of hours of investigations how to implement it in the reality. Especially in my deployment way (with an rc file). - A single entrypoint of plugins/hooks documentation with a clear table of contents would be very useful. Like this: https://www.easypost.com/docs/api . Examples of plugins with the different types of connection (library/rc file/cli) like code examples in different languages also would be super useful (here https://www.easypost.com/docs/api it is implemented as a dropdown list, some sites use tabs: https://cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues.tasks/run).
I like Postgraphile a lot, but every time I need to do something by my own plugins I feel pain... :(
- Lenguaje dominante
- SCSS
- Estrellas
- 27
- Forks
- 124
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin 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 graphile/graphile.github.io
-
help wanted quick
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
graphile/graphile.github.io#401 · 1 comentario · 1 reacción ·
-
website: Update details on homepage and sponsor pageQuizá libre de nuevo @jemgillam la tomó hace 1119 días y no hay ningún pull request abierto. Abiertoquick
graphile/graphile.github.io#399 · 4 comentarios · 1 asignado ·
-
sponsor page: New wording around Grafast needed!Quizá libre de nuevo @jemgillam la tomó hace 1149 días y no hay ningún pull request abierto. Abierto
graphile/graphile.github.io#393 · 1 reacción · 1 asignado ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
graphile/graphile.github.io#341 · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
graphile/graphile.github.io#280 · 2 comentarios · 5 reacciones ·
Todos los issues de graphile/graphile.github.io
Issues similares
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
gke-labs/kube-agents#7308 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
-
chore
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
lugassawan/swe-workbench#841 ·