You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introspection results are available via the pgIntrospectionResultsByKind object on Build; but for your changes to take effect you must make any changes before other plugins use the introspection results. One way to achieve this is using the new dependencies system; e.g.:
module.exports=builder=>{builder.hook(// Hook name:'build',// Hook function:build=>{constattribute=build.pgIntrosectionResultsByKind.attribute.find(attr=>attr.name==='my_column'&&attr.class&&attr.class.name==='my_table'&&attr.class.namespaceName==='my_schema');if(attr){constnewTypeId='23';// OID 23 is an int4attr.typeId=newTypeId;attr.type=build.pgIntrospectionResultsByKind.type.find(t=>t.id===newTypeId);}// Must return input, or a derivative thereofreturnbuild;},// Provides: We don't particularly provide anything, so empty:[],// Before: Must be before PgTypes (where the type is first used):['PgTypes'],// After: Must be after PgIntrospection (otherwise pgIntrospectionResultsByKind doesn't exist):['PgIntrospection']);};
I'm submitting a ...
PostGraphile version: 4.3.3
You mentioned the possibility of changing introspection results to switch data types. Please provide some examples on how to do this.
Additionally, it would be nice to know how to add things to the introspection results (i.e. to implement additional smart comments).
The text was updated successfully, but these errors were encountered: