All you have to do is re-define the 'CustomerInput' parameter (with your custom extension attribute) of the createCustomer mutation.
In your module's schema.graphqls file, re-define the 'CustomerInput' type.
input CustomerInput {
your_extention_attr: String
}
Then run the below commands.
rm -rf generation/
bin/magento c:f
Now you can parse this new parameter in createCuatomer mutation. See the example below.
mutation {
createCustomer(
input: {
firstname: "Bob"
lastname: "Loblaw"
email: "bobldsdd2@example.com"
password: "b0bl0bl@w"
is_subscribed: true
your_extention_attr: "this is a test value"
}
) {
customer {
id
firstname
lastname
email
is_subscribed
}
}
}