0

error says: property 'type' is missing in type '{ args: { user_id: { type: GraphQLScalarType<number, number>; }; user_name: { type: GraphQLScalarType<string, string>; }; bank_accounts: { type: GraphQLScalarType<string, string>; }; }; resolve(parent: any, args: any): any; }' but required in type 'GraphQLFieldConfig<any, any, any>'.

11 fields: {addAccountDetails:CREATE_USER},

This is my code link

https://drive.google.com/file/d/1XxA5RDQUshzeppDA3FgXD9l2CL8uIAD0/view?usp=sharing

if you wish to download and install the npm module then you can check. also, I attached my error pictures. Please see that very basic error.

enter image description here

when I declare my own type account it shows an error in the index.ts file as you can see in the above error says the text.

enter image description here

Here I created a new Graphql object for an account.

enter image description here

I want to achieve this in the red text. how can I get it? please help me.

1 Answer 1

1

If you want to make bank_accounts string array you should use GraphQLList like this:

bank_accounts: { type: new GraphQLList(GraphQLString) }

Also if you plan to store ids in the array it would be better to use GraphQLID instead of GraphQLString.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.