Adding did:pkh as a DID

How are other people adding did:pkh as a DID when running a ceramic local node?

I’m getting an error when adding a did:pkh

I see that the regex for DID scalar has been updated and merged to include did:pkh here: feat: Expand the DID scalar regex to accommodate did:pkh by mcclurejt · Pull Request #1801 · Urigo/graphql-scalars · GitHub

my schema below to add a did:pkh in the creator field

type Post @createModel(accountRelation: LIST, description: "A ball to display") {
  creator: DID! @accountReference
  content: String! @string(minLength: 1, maxLength: 280) 

A fix what merged into composedb yesterday: update graphql-scalars package to include support for did:pkh by mcclurejt · Pull Request #112 · ceramicstudio/js-composedb · GitHub

This should be released shortly!

1 Like

New versions of the packages and CLI including the fix have been released, please try again after updating them.

@paul Okay I’m back.
So this is weird after updating packages, in my local ceramic node running on localhost:7000 I’m able to start the graphql server (composedb graphql:server --graphiql --port=35000) and save the did:pkh.

I then try using @composedb/client in my app to hit the same local ceramic node running on port 7000 and I’m still getting the did:pkh is not a valid did. basically it’s still using the old regex to verify the did.

I checked my package lock for @composedb/client and it’s version 0.4.4. I’m not too sure why I can save a did:pkh using graphqli and not the @composedb/client

Hi, please make sure you re-create any model created with a previous version of the packages, as previously created model would likely get validated with the previous version of the regexp.

thanks paul that was exactly it! Had to recreate my model