Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Auto Generated Mutations don't include any custom Scalars #109

Closed
Murcho opened this issue Sep 19, 2018 · 2 comments
Closed

Auto Generated Mutations don't include any custom Scalars #109

Murcho opened this issue Sep 19, 2018 · 2 comments

Comments

@Murcho
Copy link

Murcho commented Sep 19, 2018

Using the definition

scalar DateTime

type Receipt {
    receiptData: String,
    expiryDate: DateTime,
    lastValidation: DateTime,
    status: String
}

only generates the CreateReceipt mutation with the following arguments

CreateReceipt(receiptData:String!, status:String): Receipt

I can manually generate the mutation by adding the definition

type Mutation {
    CreateReceiptDated(receiptData: String, expriyDate: DateTime, lastValidation:  DateTime, status: String): Receipt
}

and then creating the following resolvers

resolvers = {
    DateTime: GraphQLDateTime,
    Mutation: {
        CreateReceiptDated(object, params, ctx, resolveInfo) {
            return neo4jgraphql(object, params, ctx, resolveInfo, true);
        }
    }
};

The auto generated mutation should include the custom scalar in the signature.

@appinteractive
Copy link

Was it fixed with the latest pr?

@johnymontana
Copy link
Contributor

@appinteractive yes, this has been fixed. You can see this working in the augment schema tests

Please let us know if it isn't working for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants